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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
BrittH
Regular Visitor

How to calculate difference score in matrix visual

Hello,

 

I was wondering whether anyone can help me.

 

In the screenshot below you see a matrix. I want to have another column in that matrix showing the difference score between NL 13 and UT. However, NL 13 and UT are not measures. They are rows in the Excel column 'Instellingen' in the Excel table 'UT_NL_totaal'. How can I add a new score 'difference NL 13 vs UT' and show that in the matrix as an extra column? 

Screenshot 2024-05-03 094534.jpg

 

1 ACCEPTED SOLUTION
Uzi2019
Super User
Super User

Hi @BrittH 
Create below meausre like this

Final =
 var NL= calculate( sum(amount), Intelligen= "NL 13")
var UT= calculate (Sum(amount), Intelligen= "UT")
var Difference = [NL]- [UT]

Return Difference

 

I hope it may resolves your issue!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

5 REPLIES 5
Uzi2019
Super User
Super User

Hi @BrittH 
Create below meausre like this

Final =
 var NL= calculate( sum(amount), Intelligen= "NL 13")
var UT= calculate (Sum(amount), Intelligen= "UT")
var Difference = [NL]- [UT]

Return Difference

 

I hope it may resolves your issue!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hello @Uzi2019 ,

 

Thank you for your help. What do I need to fill in for 'amount'? 

 

Best,

Britt 

Hi @BrittH 

 

I think you are taking Mean  in value section of a Matrix.

So change the formula according to you numeric value taken in your table.

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

@Uzi2019 Thank you. I tried that. I have a measure now. I am not sure it is correct. Anyhow, I cannot add it to the columns in the visual. When I drag it to Columns under Visualizations, it does not stay there.

Hi @BrittH 

Try to take all value in table visuals not in matrix for testing purpose.

Uzi2019_0-1714736674931.png

 

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.