Forum Discussion
Anonymous
5 years agoNot applicable
Calculated column or Measure
Hi, Can anyone please help me on the below scenario. Table 01: Data in Power BI: DATE USER DESC NAME RV RB Diff FLAG 31/09/2019 NA CP MASTER 1137942.43 0 0 RV not RB ...
- Anonymous5 years ago
Hi Anonymous ,
You don't have a column to use as hierarchy so I doubt you could create a matrix table.
Here's the formula for table visual.
Measure = var rb = SUM('Table'[RB]) var rv = SUM('Table'[RV]) return SWITCH(TRUE(), rb<>0&&rv<>0,"RB and RV", rb<>0&&rv=0,"RB not RV", rb=0&&rv<>0,"RV not RB" )Best Regards,
Jay
jdbuchanan71
5 years agoSuper User
Ah, I did misunderstand. You will need 4 measures.
RV Amount = SUM ( 'Table'[RV] )RB Amount = SUM ( 'Table'[RB] )Diff Amount = SUM ( 'Table'[Diff] )Flag Measure =
SWITCH (
TRUE(),
[RV Amount] <> 0 && [RB Amount] <> 0, "RV and RB",
[RV Amount] <> 0 && [RB Amount] = 0, "RV not RB",
[RV Amount] = 0 && [RB Amount] <> 0, "RB not RV",
"Not RV or RB"
)
I think that will give what you are looking for.