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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to create variance field and variance %

Hello all,

 

 

i'm beginner and just want to know how i can create the variance of column 1 and 2 and also the variance %

 

2017-05-29 13_49_50-Orakel Product Performance v1.0 - Power BI Desktop.png

 

the numbers 1 until 5 represent columname MONTH and the products represent columnname PRODUCT.

 

Kind regards,

 

Rega

 

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

You can create measures below:

 

Variance = CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=1))-CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=2))

 

Variance % = DIVIDE('Table1'[Variance],CALCULATE(SUM(Table1[Amount]),FILTER(ALL(Table1),'Table1'[Month]=1)))

 

q2.PNG

 

By the way, I would suggest you display those two measures in card visuals. As you use matrix visual to display data originally, if we add two measures to this matrix, two measures values will display under each column group, means under 1, 2,...,5, each will have three columns. It will make the matrix messy, as you just want to return variance between the 1 and 2.

 

Best Regards,
Qiuyun Yu

 

 

Community Support Team _ Qiuyun Yu
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

6 REPLIES 6
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

You can create measures below:

 

Variance = CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=1))-CALCULATE(SUM(Table1[Amount]),FILTER(Table1,'Table1'[Month]=2))

 

Variance % = DIVIDE('Table1'[Variance],CALCULATE(SUM(Table1[Amount]),FILTER(ALL(Table1),'Table1'[Month]=1)))

 

q2.PNG

 

By the way, I would suggest you display those two measures in card visuals. As you use matrix visual to display data originally, if we add two measures to this matrix, two measures values will display under each column group, means under 1, 2,...,5, each will have three columns. It will make the matrix messy, as you just want to return variance between the 1 and 2.

 

Best Regards,
Qiuyun Yu

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

How did you get the Table reference to work? I can't find table names or anything similar to that using the current PowerBI Desktop.

Anonymous
Not applicable

HI @v-qiuyu-msft,

 

Thanks for your advise. But what if want to have measures which calculate the variance and variance % between month 2 and 3 or 4 and 5 ? So to have a flexible measurements?

 

 

Have a look at our Variance and Waterfall Chart:

https://dataviz.boutique/

FeatureSheetVarianceOS.pngFeatureSheetWaterfall6.PNG

Greg_Deckler
Super User
Super User

Do you mean like:

 

Variance = [1] - [2]

Variance% = ([1] - [2]) / [1]

@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler,

 

indeed!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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