Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I want to calculate the difference in values between versions of files in matrix visualization. I tried to present it as simply as possible on a picture. I am also including the pbx file
Solved! Go to Solution.
Hi, @krzysztof
You may create a calculated table and a measure as below.
Calculated table:
Table = DISTINCT(Arkusz1[File_Name])
Measure:
Result =
IF(
ISINSCOPE(Arkusz1[File_Name]),
var _value1 =
CALCULATE(
SUM(Arkusz1[Values]),
FILTER(
ALL(Arkusz1),
Arkusz1[Company]=SELECTEDVALUE(Arkusz1[Company])&&
Arkusz1[Category]=SELECTEDVALUE(Arkusz1[Category])&&
Arkusz1[Week]=SELECTEDVALUE(Arkusz1[Week])&&
Arkusz1[File_Name]=SELECTEDVALUE('Table'[File_Name])
)
)
return
_value1-SUM(Arkusz1[Values])
)
Finally you need to replace 'File_Name' column from 'Arkusz1' in 'Columns' area with 'File_Name' column from 'Table'.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @krzysztof
You may create a calculated table and a measure as below.
Calculated table:
Table = DISTINCT(Arkusz1[File_Name])
Measure:
Result =
IF(
ISINSCOPE(Arkusz1[File_Name]),
var _value1 =
CALCULATE(
SUM(Arkusz1[Values]),
FILTER(
ALL(Arkusz1),
Arkusz1[Company]=SELECTEDVALUE(Arkusz1[Company])&&
Arkusz1[Category]=SELECTEDVALUE(Arkusz1[Category])&&
Arkusz1[Week]=SELECTEDVALUE(Arkusz1[Week])&&
Arkusz1[File_Name]=SELECTEDVALUE('Table'[File_Name])
)
)
return
_value1-SUM(Arkusz1[Values])
)
Finally you need to replace 'File_Name' column from 'Arkusz1' in 'Columns' area with 'File_Name' column from 'Table'.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @krzysztof ,
Create two disconnected table with the File Name and File_Name distinct values then add the following measure:
File_Values =
CALCULATE (
SUM ( Arkusz1[Values] ),
FILTER (
ALLSELECTED ( Arkusz1[File_Name] ),
Arkusz1[File_Name] = SELECTEDVALUE ( File_Name[File_Name] )
)
)
- CALCULATE (
SUM ( Arkusz1[Values] ),
FILTER (
ALLSELECTED ( Arkusz1[File Name] ),
Arkusz1[File Name] = SELECTEDVALUE ( 'File Name'[File Name] )
)
)
Now setup your matrix in the following way:
Check result in attach PBIX there are some plus and minus that are not correct not sure if is of your data or the calculation you made for the example but an easy fix for sure.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
125 | |
78 | |
76 | |
59 | |
51 |
User | Count |
---|---|
164 | |
86 | |
68 | |
68 | |
58 |