The output matrix in Power BI should contain the measures X, Y, and Z. Where
X = (B+C);
X = IF((MAX(Sheet1[C1])) = "B", SUM(Sheet1[C2]), IF(MAX(Sheet1[C1]) = "C", SUM(Sheet1[C2])))
Y = A - (B+c);
Y = IF(MAX(Sheet1[C1]) = "A", CALCULATE( ((-1) * SUM(Sheet1[C2])) + [X]))
Z = (A/(A-(B+c)))*100%
I have achieved till total which is quite easy but, I am unable to replicate the same output in Power BI.
Thanks.
I have tried and found a way to achieve the above result with a couple of slicers and more tables, sadly I have only succeeded to achieve till Y = A-(B+C)
.
SO the whole visualisation till Y
will be a combination of tables and matrices. To achieve the desired visual, I followed the following steps:
C1
and C2
in the row section of the matrix and the C2
in the Value section of the matrix and set it to the sum of 'C2`.Create a measure X with the following formula:
X = IF(((MAX(Sheet1[C1])) = "B" || (MAX(Sheet1[C1]) = "C")), SUM(Sheet1[C2]))
Create a table with the column C1
and measure X
in it.
Create a slicer with C1
, open the Format pane go to Edit Interaction
options, and set the interaction to only the Table having measure X
and the column C1
, disable any other interaction.
In the slicer select the option B
and C
, because the X is only concerned with the values B & C. The table should display the total.
Create another measure Y with the following DAX:
Y = CALCULATE(SUM(Sheet1[C2]), KEEPFILTERS(Sheet1[C1] = "A")) + CALCULATE(-SUM(Sheet1[C2]), KEEPFILTERS(Sheet1[C1] IN {"B", "C"}))
Repeat the steps 3 & 4 again for measure Y. This should be your output.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.