I've been using Excel for years but have recently been seduced by the appeal of Power BI as a means of providing more 'visually friendly' reports for other users to view and analyse. Whilst I can generally get Excel to do what I want to do (possibly through horrendously inefficient formulas/code), Power BI is just boggling my mind at the moment.

The issues is such; I have a large data source, that I have no ability to change, that's updated weekly and I download. I've currently written a macro that I run on each download that basically adds a load of additional columns containing formulas - I then save the Excel file and refresh my data source in Power BI, which makes all the visuals look pretty. However, I feel this is essentially a cop out of using Power BI fully - and that the 'proper' solution (given that I can't change the original data source) would be import the unedited report into Power BI directly and then use Power Query / DAX to alter/add to the data as required.

My Excel data is as below (which I sort by Column F, then R and then S, before my applying formulas in columns V-AD);

F | O | P | R | S | U | V | W | X | Y | Z | AA | AB | AC | AD | |

1 | Employee No. | On Cal | Roster Date | Shift Start | Shift Finish | Shift Paid | On Call? | Rest | <12hrs | >12hrs | 7 days | >60hrs | >72hrs | Consecutive | 13+ shifts |

2 | Number/Text | Y/N | DD-MM-YY | DD-MM-YY HH:MM:SS | DD-MM-YY HH:MM:SS | H.MM | =IF(O2="Y",IF(SUMPRODUCT(($F$2:$F2=F2)*($P$2:$P2=P2))>1,0,1),0) | =IF(F2<>F1,23.99,IF(R2="",23.99,IF(S1="",23.99,(R2-S1)*24))) | =IF(AND(W2<12,W2>0),1,0) | =IF(W2=0,IF(U2+U1>12,1,0),IF(U2>12,1,0)) | =SUMIFS(U:U,F:F,F2,P:P,"<="&P2,P:P,">="&P2-6) | =IF(Z2>60,IF(P2=P3,0,1),0) | =IF(Z2>72,IF(P2=P3,0,1),0) | =IF(F2=F1,IF(R2<>"",IF(P2=P1,AC1,IF(P2-P1=1,AC1+1,1)),0),0) | =IF(AC2>13,IF(P2=P3,0,1),0) |

<tbody>

</tbody>

The primary reason for needing all the additional formulas is there can be multiple entries for the same employee number (F), on the same date (P) and its important to distinguish if these entries and consecutive or not (based on start start/finish times (R/S)) but at the same time not double counting those entries for other measures. What I want to know/learn how to do is convert the above formulas to DAX and/or Power Query equivalents, if possible? I've attempted this a few times before by googling/reading stuff but usually just end up confusing myself even more.

The above is actually one of three sheet I do similar things to, but I figure if I can get the above cracked (or even just some of it) I'll be able to figure out the rest from there.

Any help appreciated and if you need any more info please let me know.