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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Variance Calculation

 Hi, 

 I got some requirement as mentioned below. Slicer P1 and P2 contains data in the form of (Q1 2020,Q2 2020,Q4 2019). First visuals shows the average of "Index Score" column. For displaying the data I am using Matrix visual. P1 Slicer(Q1 2020 is selected) controls the first visual , P2 Slicer(Q2 2020 is selected ) controls the second visual. In the third visual I have to show the difference of values between the two matrix visuals. I have shared the sample dataset below the first image. Kindly help me out with this if you have any idea on this kind of requirement.

rahudas_0-1615394724135.png

 

This is how my data looks like.

MUAreaParameter NamePeriodIndex Score
USACore IndexAETTQ1 20206
USACore IndexAETTQ2 20208
USACore IndexAETTQ3 20209
USACore IndexAETTQ4 20197
USAPeople IndexDCSICRQ1 202010
USAPeople IndexDCSICRQ2 20206
USAPeople IndexDCSICRQ3 20208
IndiaPeople IndexDCSICRQ4 20199
IndiaPeople IndexDCSICRQ1 20207
IndiaPeople IndexDCSICRQ2 202010
IndiaPeople IndexDCSICRQ3 20206
CanadaTransformation IndexAnkurQ4 20198
CanadaTransformation IndexAnkurQ1 20209
USATransformation IndexAnkurQ2 20207
USATransformation IndexAnkurQ3 202010
USATransformation IndexAnkurQ4 20196
USATransformation IndexRATQ1 20208
USATransformation IndexRATQ2 20209
USATransformation IndexTPLANEQ3 20207
USATransformation IndexTPLANEQ4 201910
CanadaTools & Method Standardization IndexCSIPQ1 20206
CanadaTools & Method Standardization IndexCQSCQ2 20208
CanadaTools & Method Standardization IndexCSIPQ3 20209
USATools & Method Standardization IndexAnkurQ4 20197
USATools & Method Standardization IndexAnkurQ1 202010
USATools & Method Standardization IndexCQSCQ2 20206
USATools & Method Standardization IndexCSIPQ3 20208

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

The pbix file is here.

 

1.Create two separate period tables

Screenshot 2021-03-12 162526.pngScreenshot 2021-03-12 162534.png

 

2.Create three measures, 

P1Measure = CALCULATE(SUM('Table'[Index Score]),FILTER('Table',[Period]=SELECTEDVALUE(P1[Period])))
P2Measure = CALCULATE(SUM('Table'[Index Score]),FILTER('Table',[Period]=SELECTEDVALUE(P2[Period])))
Variance = [P2Measure]-[P1Measure]

 

Screenshot 2021-03-12 162501.png

 

 

Best Regards,

Stephen Tao

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

The pbix file is here.

 

1.Create two separate period tables

Screenshot 2021-03-12 162526.pngScreenshot 2021-03-12 162534.png

 

2.Create three measures, 

P1Measure = CALCULATE(SUM('Table'[Index Score]),FILTER('Table',[Period]=SELECTEDVALUE(P1[Period])))
P2Measure = CALCULATE(SUM('Table'[Index Score]),FILTER('Table',[Period]=SELECTEDVALUE(P2[Period])))
Variance = [P2Measure]-[P1Measure]

 

Screenshot 2021-03-12 162501.png

 

 

Best Regards,

Stephen Tao

 

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

amitchandak
Super User
Super User

@Anonymous , for this you need two independent period table.

 

Refer to my blog on the same topic with a date range

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

Top Solution Authors