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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Variance Formula

Hello,

 

I am looking for assistance creating a formula to calculate the variance between two periods. I have created an example below. 

 

What I need is to write a formula comparing budget to each of the other period types. Essentially I would like to compare/show a variance comparing 2020 budget to 2020 6+6, 2020 7+5 and 2020 Forecast

 

Thanks!

 

PeriodDollarsPeriod (Budget - Other) Variance

2020 Budget

9953 
2020 Forecast8795 

2020 1+11

4652 
2020 2+107452 
2020 3+95642 
2020 4+84511 
2020 5+73225 
2020 6+67569 

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

if you want to create a column , pls try

Column = MAXX(FILTER('Table','Table'[Period]="2020 Budget"),'Table'[Dollars])-'Table'[Dollars]

1.PNG

if you want to create a measure , pls try

Measure = SUMX(FILTER(ALL('Table'),'Table'[Period]="2020 Budget"),'Table'[Dollars])-sum('Table'[Dollars])

2.PNG

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@Anonymous - Did the answers provided by @ryan_mayu  and @DataInsights  meet your needs? If so, please mark an answer or @ me. Thanks.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
ryan_mayu
Super User
Super User

@Anonymous 

if you want to create a column , pls try

Column = MAXX(FILTER('Table','Table'[Period]="2020 Budget"),'Table'[Dollars])-'Table'[Dollars]

1.PNG

if you want to create a measure , pls try

Measure = SUMX(FILTER(ALL('Table'),'Table'[Period]="2020 Budget"),'Table'[Dollars])-sum('Table'[Dollars])

2.PNG

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




DataInsights
Super User
Super User

@Anonymous, try these measures:

 

2020 Budget = CALCULATE ( SUM ( Table[Dollars] ), Table[Period] = “2020 Budget” )

2020 6+6 = CALCULATE ( SUM ( Table[Dollars] ), Table[Period] = “2020 6+6” )

Variance - Budget vs 6+6 = [2020 Budget] - [2020 6+6]

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.