Forum Discussion
Matrix visual with difference calculation from total row
- 4 years ago
Hi Anonymous ,
Please create a new table.
Table = VAR newcapacity = CROSSJOIN ( Capacity, VALUES ( Train[Day] ) ) VAR UnionTab = UNION ( Train, SELECTCOLUMNS ( newcapacity, "Company", [Company], "Train", "Capacity", "Day", [Day], "Load", [Capacity] ) ) RETURN ADDCOLUMNS ( UnionTab, "Type", IF ( [Train] = "Capacity", "Capacity", "Train" ) )Then create these measures.
Load and Capacity = CALCULATE ( SUM ( 'Table'[Load] ), 'Table'[Company] = "Company A" )TotalValue = VAR diff = CALCULATE ( [Load and Capacity], 'Table'[Type] = "Train" ) - CALCULATE ( [Load and Capacity], 'Table'[Type] = "Capacity" ) RETURN IF ( ISFILTERED ( 'Table'[Type] ), [Load and Capacity], diff )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , there is work around suggeted here
Power bi Excel for P&L , add in app
Curbal
https://www.youtube.com/watch?v=IISYzTaIyu4
Guyinacube
https://www.youtube.com/watch?v=1yJnmZRTNZg
- Anonymous4 years agoNot applicable
amitchandak Thank you for your reply.
I watched both videos that suggest adding an Excel workbook to a Power BI app.
Is that the only way to achieve this? I'd like to have the matrix within a report.