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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

[DAX] Measure which returns the difference (%) between daily totals and a baseline value?

DateValue
01/01/2020500
... 
29/02/2020650
01/03/2020700
02/03/2020600
... 
31/08/2020550

 

I am calculating a baseline value as the median of January and February values (bolded in table above):

 

Baseline Value = CALCULATE(MEDIAN('Table'[Value]), 'Table'[Month Number] < 3)
 
I want to determine the % difference between Baseline Value and all future values (i.e. months >= 3). I imagine the pseudo-code to look something like:
 
Difference From Baseline = DIVIDE('Table'[Value] - 'Table'[Baseline Value], 'Table'[Baseline Value])

 

When I attempt to plot Difference From Baseline on a line chart, I get a flat line for all future dates. I am guessing I need to somehow FILTER for each unique date? Any help is much appreciated.

1 ACCEPTED SOLUTION
amitjzaveri
Resolver II
Resolver II

@Anonymous  Please change the baseline formula as follows then it should work

 

Baseline Value = CALCULATE(MEDIAN('Table'[Value]), MONTH('Table'[Date]) < 3)

Difference From Baseline = DIVIDE(SUM('Table'[Value])-[Baseline Value],[Baseline Value])

 

Example output:

 

bi.png

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

Cheers!

View solution in original post

2 REPLIES 2
amitjzaveri
Resolver II
Resolver II

@Anonymous  Please change the baseline formula as follows then it should work

 

Baseline Value = CALCULATE(MEDIAN('Table'[Value]), MONTH('Table'[Date]) < 3)

Difference From Baseline = DIVIDE(SUM('Table'[Value])-[Baseline Value],[Baseline Value])

 

Example output:

 

bi.png

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

Cheers!

Anonymous
Not applicable

Thanks. The problem was my Baseline calculation as you suggested.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.