Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello Community,
I came up with below 4 formulas for the WoW calculation but I'm not able to calculate the value for the previous week!
I have context filters applied! The DAX 4 returns (blank) value but the DAX 3 (current week value) returns the correct value
Dax 1 (Current Week Rank) :
Solved! Go to Solution.
Hi @amane ,
You have to add "ALL" after filter function,since they are measures.
See below:
W Test 1 = CALCULATE(MAX(Sheet1[Week Rank]) , FILTER(ALL(Sheet1) , Sheet1[Start_Date] < Sheet1[current_date]))W Test 2 = CALCULATE(MAX(Sheet1[Week Rank]) , FILTER(ALL(Sheet1 ), Sheet1[Start_Date] < Sheet1[current_date])) - 1W Test 3 =
VAR WW = [W Test 1]
RETURN
CALCULATE(
SUM(Sheet1[Value]),
FILTER(ALL(Sheet1) , Sheet1[Week Rank] = WW
)
)W Test 4 =
VAR WW = [W Test 2]
RETURN
CALCULATE(
SUM(Sheet1[Value]),
FILTER(Sheet1 , Sheet1[Week Rank] = WW
)
)
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Here is the attached file : https://drive.google.com/file/d/1MmgEq7wchWK-Gj9dne4pf3hhJRBmceyW/view?usp=sharing
Hi @amane ,
You have to add "ALL" after filter function,since they are measures.
See below:
W Test 1 = CALCULATE(MAX(Sheet1[Week Rank]) , FILTER(ALL(Sheet1) , Sheet1[Start_Date] < Sheet1[current_date]))W Test 2 = CALCULATE(MAX(Sheet1[Week Rank]) , FILTER(ALL(Sheet1 ), Sheet1[Start_Date] < Sheet1[current_date])) - 1W Test 3 =
VAR WW = [W Test 1]
RETURN
CALCULATE(
SUM(Sheet1[Value]),
FILTER(ALL(Sheet1) , Sheet1[Week Rank] = WW
)
)W Test 4 =
VAR WW = [W Test 2]
RETURN
CALCULATE(
SUM(Sheet1[Value]),
FILTER(Sheet1 , Sheet1[Week Rank] = WW
)
)
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 54 | |
| 45 | |
| 38 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 86 | |
| 69 | |
| 38 | |
| 29 | |
| 26 |