Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Percent of Change on total measure

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. 

 

lkhall_0-1693230268884.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

 

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:

 

vyangliumsft_0-1693383783074.png

 

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi  @Anonymous ,

 

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:

 

vyangliumsft_0-1693383783074.png

 

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.