Forum Discussion
DimaMD
Solution Sage
2 years agoHierarchy in the table matrix
Hello community, I haven't asked for help in a long time, but I faced such a problem I have several measures that I want to group in a matrix visualization. For the hierarchy, I created a simple ta...
- 2 years ago
Hi DimaMD ,
Based on your additional description, please try code as below.
MEASURE = VAR _P1 = SELECTEDVALUE ( Table1[P1] ) VAR _P2 = SELECTEDVALUE ( Table1[P2] ) RETURN IF ( ISINSCOPE ( 'Table1'[P2] ), SWITCH ( _P2, "R_Cashless", [R_Cashless], "R_Cash", [R_Cash], "P_Cashless", [P_Cashless], "P_Cash", [P_Cash], "Stock balance", [Stock balance] ), SWITCH ( _P1, "Stock balance", [Stock balance], "Receivables", [Receivables], "Payables", [Payables] ) )Result is as below.
Hope that works for you.
Best Regards,
Yulia Yan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-weiyan1-msft
Community Support
2 years agoHi DimaMD ,
Based on your additional description, please try code as below.
MEASURE =
VAR _P1 =
SELECTEDVALUE ( Table1[P1] )
VAR _P2 =
SELECTEDVALUE ( Table1[P2] )
RETURN
IF (
ISINSCOPE ( 'Table1'[P2] ),
SWITCH (
_P2,
"R_Cashless", [R_Cashless],
"R_Cash", [R_Cash],
"P_Cashless", [P_Cashless],
"P_Cash", [P_Cash],
"Stock balance", [Stock balance]
),
SWITCH (
_P1,
"Stock balance", [Stock balance],
"Receivables", [Receivables],
"Payables", [Payables]
)
)
Result is as below.
Hope that works for you.
Best Regards,
Yulia Yan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- DimaMD2 years ago
Solution Sage
Hi v-weiyan1-msft So this is what I was looking for, the measure worked correctly with my data, thank you very much