Forum Discussion
Linking two matrix with different data
- Anonymous5 years ago
Hi Anonymous ,
Here are the steps you can follow:
1. Create calculated table.
Slice = DISTINCT('Table'[Attribute])2. Create measure.
Measure = var _select =SELECTEDVALUE('Slice'[Attribute]) return CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Quarter]=MAX('Table'[Quarter])&&'Table'[Year]=MAX('Table'[Year])&&'Table'[Attribute]=_select))Measure 2 = var _select =SELECTEDVALUE('Slice'[Attribute]) return SWITCH( TRUE(), _select="Operating Income",CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Attribute]="AOI%"&&'Table'[Quarter]=MAX('Table'[Quarter])&&'Table'[Year]=MAX('Table'[Year]))), _select="EBITDA",CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Attribute]="EBITDA%"&&'Table'[Quarter]=MAX('Table'[Quarter])&&'Table'[Year]=MAX('Table'[Year]))))3. Use the [Attribute] of the Slice table as a slicer, create two matrices, and put them into Measure and Measure2 respectively
Slice:
Matrix 1:
Matrix 2:
4. Result:
Select "Operating Income" in the slicer, the value of "Operating Income" is displayed in matrix 1, and the value of "AOI%" is displayed in matrix 2.
Select "EBITDA" in the slicer, the value of "EBITDA" is displayed in matrix 1, and the value of "EBITDA %" is displayed in matrix 2.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Anonymous ,
Here are the steps you can follow:
1. Create calculated table.
Slice =
DISTINCT('Table'[Attribute])
2. Create measure.
Measure =
var _select =SELECTEDVALUE('Slice'[Attribute])
return
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Quarter]=MAX('Table'[Quarter])&&'Table'[Year]=MAX('Table'[Year])&&'Table'[Attribute]=_select))Measure 2 =
var _select =SELECTEDVALUE('Slice'[Attribute])
return
SWITCH(
TRUE(),
_select="Operating Income",CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Attribute]="AOI%"&&'Table'[Quarter]=MAX('Table'[Quarter])&&'Table'[Year]=MAX('Table'[Year]))),
_select="EBITDA",CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Attribute]="EBITDA%"&&'Table'[Quarter]=MAX('Table'[Quarter])&&'Table'[Year]=MAX('Table'[Year]))))
3. Use the [Attribute] of the Slice table as a slicer, create two matrices, and put them into Measure and Measure2 respectively
Slice:
Matrix 1:
Matrix 2:
4. Result:
Select "Operating Income" in the slicer, the value of "Operating Income" is displayed in matrix 1, and the value of "AOI%" is displayed in matrix 2.
Select "EBITDA" in the slicer, the value of "EBITDA" is displayed in matrix 1, and the value of "EBITDA %" is displayed in matrix 2.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly