The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |