Forum Discussion
krzysztof
6 years agoHelper III
Matrix calculus - specific formula for matrix
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 ...
- 6 years ago
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.
v-alq-msft
6 years agoCommunity Support
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.