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.
While I feel like this should be simple I am stuggling to come up with the appropriate DAX to calculate Week over Week percent of change. For the below matrix I want to be able to show the % of change week over week for the total patient count. Any guidance would be greatly appreciated.
Solved! Go to Solution.
Hi @lkhall ,
Here are the steps you can follow:
1. Create calculated column.
week = WEEKNUM('Table'[Date],2)
2. Create measure.
Measure =
var _current=
SUMX(
FILTER(ALL('Table'),'Table'[Group]=MAX('Table'[Group])&&'Table'[week]=MAX('Table'[week])),[Value])
var _next=
SUMX(
FILTER(ALL('Table'),'Table'[Group]=MAX('Table'[Group])&&'Table'[week]=MAX('Table'[week])+1),[Value])
return
DIVIDE(
_next,_current)
Measure 2 =
var _table=SUMMARIZE('Table','Table'[Group],"Value",[Measure])
return
IF(
HASONEVALUE('Table'[Group]),
[Measure],SUMX(_table,[Value]))
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @lkhall ,
Here are the steps you can follow:
1. Create calculated column.
week = WEEKNUM('Table'[Date],2)
2. Create measure.
Measure =
var _current=
SUMX(
FILTER(ALL('Table'),'Table'[Group]=MAX('Table'[Group])&&'Table'[week]=MAX('Table'[week])),[Value])
var _next=
SUMX(
FILTER(ALL('Table'),'Table'[Group]=MAX('Table'[Group])&&'Table'[week]=MAX('Table'[week])+1),[Value])
return
DIVIDE(
_next,_current)
Measure 2 =
var _table=SUMMARIZE('Table','Table'[Group],"Value",[Measure])
return
IF(
HASONEVALUE('Table'[Group]),
[Measure],SUMX(_table,[Value]))
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
User | Count |
---|---|
14 | |
12 | |
7 | |
6 | |
5 |
User | Count |
---|---|
28 | |
18 | |
13 | |
7 | |
5 |