Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am trying to establish a matrix table in PBI.
One of the calculation is subtracting a top row value to another row from a matrix.
For example,
I used DAX to do the samething.
Drivers value2 =
VAR production =
calculate(sum('Summary Data'[Value])/1000000,
'Expense Roll up Mapping'[Expense Layer 3] ="Production Labor")
var adl2 =
calculate(sum('Summary Data'[Value])/1000000,
'Expense Roll up Mapping'[Expense Layer 3] ="Associate Domestic Labor",
ALL('Summary Data'[New BU])
)
var adl =
calculate(sum('Summary Data'[Value])/1000000,
'Summary Data'[Expense RollUp_P&L] ="Associate Domestic Labor"
)
return
SWITCH(SELECTEDVALUE('Expense Roll up Mapping'[Expense Layer 3]),
"Production Labor", IF(ISBLANK(production),0, production),
"Associate Domestic Labor", IF(ISBLANK(adl2-production), 0 ,adl2-production))
However, the result is the following:
I guess that in matrix, my Associate Domestic Labor row in expense layer 3 can't subtract different rows' values, production from the same table.
Is there any way that I can get this?
Please advise.
Thank you.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
8 | |
6 |