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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
erihsehc
Helper III
Helper III

variance against target calculation

hi there,

 

For the below screenshot, I would like to create a column for target%GP and one column for GP% variance against target on matrix. I have no idea how to create it (I can not directly drag the targetGP% column to matrix), would you help on that? thanks

 

target var cal.JPG

Data model is as below

 data model

 

Best regards,

ER

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @erihsehc,

 

Based on my test, your should be able to follow steps below to get your expected result.

 

1. Set the Cross filter direction of the relationship the two tables to Both.

 

re.PNG

 

2. Then should be able to use the formulas below to create two measures to calculate target%GP and the variance, and show them on the Matrix.

Target GP% = MAX(Target[targetGP%])
Variance = [GP%] - [Target GP%]

r1.PNG

 

Here is the modified sample pbix file for your reference. Smiley Happy

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Employee
Employee

Hi @erihsehc,

 

Based on my test, your should be able to follow steps below to get your expected result.

 

1. Set the Cross filter direction of the relationship the two tables to Both.

 

re.PNG

 

2. Then should be able to use the formulas below to create two measures to calculate target%GP and the variance, and show them on the Matrix.

Target GP% = MAX(Target[targetGP%])
Variance = [GP%] - [Target GP%]

r1.PNG

 

Here is the modified sample pbix file for your reference. Smiley Happy

 

Regards

thanks @v-ljerr-msft

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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