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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
lkhall
Helper I
Helper I

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  @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:

 

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  @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:

 

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.