Forum Discussion
Dynamic P&L Matrix In PBI with calculated rows
- Anonymous1 year ago
Hi, Anonymous
I changed the "3 - Total Net Operating Income/(Loss)" in your original formula to a "3 - Net Operating Income/(Loss)".
P&L Values = VAR Revenue = COALESCE([Operating Revenues], 0) VAR Expenditures = COALESCE([Net Operating Income], 0) VAR NetIncome = COALESCE([Net Operating Income], 0) VAR GainsLosses = COALESCE([Gains/Losses], 0) RETURN SWITCH( TRUE(), SELECTEDVALUE('Account Order Table'[Account Order]) = "3 - Net Operating Income/(Loss)", NetIncome, SELECTEDVALUE('Account Order Table'[Account Order]) = "1 - Revenues", Revenue, SELECTEDVALUE('Account Order Table'[Account Order]) = "2 - Expenditures", Expenditures, SELECTEDVALUE('Account Order Table'[Account Order]) = "4 - Gains/Losses", GainsLosses,0 )Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous1 year ago
YES!! I got the expected result! Thank you so much!!! - Kristi
Anonymous
You can upload xlsx or pbix to one of OneDrive, Google Drive, DropBox, WeTransfer and post the link here. You may have to change sharing rights depending on which you choose.
Also in your DAX both of these variables use the same measure:
- Anonymous1 year agoNot applicableLINK TO EXAMPLE FILE: https://drive.google.com/file/d/1H-63CxEb3M8w4sVfItD3BzsqtJ9etpyJ/view?usp=sharingThis is very simple fake data for the purpose of understanding how to get this to work.Thank you!
- Anonymous1 year agoNot applicable
Hi, Anonymous
I failed to open your link. Could you please follow the prompts for example files?
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous1 year agoNot applicable
Sorry about this. This is my first time posting here. Please try this link: https://www.dropbox.com/scl/fi/ekbu425iatvpcwrw0hd62/PowerBI_Dynamic-P-L-Test.pbix?rlkey=dx1snhkbod5b2nevhjoa9y5ak&st=23mrp2wi&dl=0