The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I am trying to compare each weeks collection amounts to the previous week. I have the following formula:
Hi @alexjaco ,
Try the measure as below:
Last weeks Collections Measure =
VAR CurrentWeek = SELECTEDVALUE(Collections[Week Number])
Var CurrentYear = SELECTEDVALUE(Collections[Year])
Var MaxWeekNumber = CALCULATE(MAX(Collections[Week Number]),ALL(Collections))
Return
CALCULATE(SUM(Collections[Weekly Collections]),
Filter(ALL(Collections),[State]=MAX([State])&&
IF(CurrentWeek=1,
Collections[Week Number] = MaxWeekNumber && Collections[Year]=CurrentYear-1,
Collections[Week Number] = CurrentWeek-1 && Collections[Year]=CurrentYear)))
If the above doesnt work,pls upload your .pbix file to onedrive business and share the link with us.Do remember to remove the confidential information.
User | Count |
---|---|
71 | |
63 | |
60 | |
49 | |
26 |
User | Count |
---|---|
117 | |
75 | |
62 | |
55 | |
43 |