Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Solved! Go to Solution.
@jiji , First you have to unpivot the Week in power query
Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g
https://radacad.com/pivot-and-unpivot-with-power-bi
Duplicate column and split week out using
Split Column By Digit to Non Digit & Non Digit to Digit: https://youtu.be/tY4Yk1crS9s
In DAX Create Rank on week rank column you got now , Make sure you create a new week tbale and do week rank there . and join with you table
Week Rank RANKX(all('Date'),'Date'[Week],,ASC,Dense)
This Week = CALCULATE(Max('Table'[Status]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(Table'[Status]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
Sumx(Values(Table[name]) , calculate( If([This Week] = [Last Week], 1, blank()) ))
or
Sumx(Summarize(Table,Table[name], Date[Week]) , calculate( If([This Week] = [Last Week], 1, blank()) ))
@jiji , First you have to unpivot the Week in power query
Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g
https://radacad.com/pivot-and-unpivot-with-power-bi
Duplicate column and split week out using
Split Column By Digit to Non Digit & Non Digit to Digit: https://youtu.be/tY4Yk1crS9s
In DAX Create Rank on week rank column you got now , Make sure you create a new week tbale and do week rank there . and join with you table
Week Rank RANKX(all('Date'),'Date'[Week],,ASC,Dense)
This Week = CALCULATE(Max('Table'[Status]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(Table'[Status]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
Sumx(Values(Table[name]) , calculate( If([This Week] = [Last Week], 1, blank()) ))
or
Sumx(Summarize(Table,Table[name], Date[Week]) , calculate( If([This Week] = [Last Week], 1, blank()) ))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
23 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
42 | |
39 | |
19 | |
19 |