Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi guys, I had trouble building this Visualization.
Whenever I put it inside a Switch function, it always returns Null. I think it has something to do with the Row Filter context.
Like in the picture, the measure for TAX and PAT return Null, therefore it is hidden?
Here is the Power BI file. Any help is appreciated.
Solved! Go to Solution.
You have 2 possiblities. Talk to the people who are doing the extract and ask them to provide you with an un-pivoted set of data, or use power query inside power bi to unpivot the data before you start analyzing it.
Help when you know. Ask when you don't!
Hello @Anonymous
The measure you are using in the switch return no value for those lines so they don't show up in the visual:
@jdbuchanan71 I used it inside the Result measure. You can check for it buddy, if everything goes right, it should appear on line 2 and 4
It might help generally, with all your visualzations and dax measures, to unpivot your data before you start
Statement | Account | Order |
L1 | 14. Profit before tax | 1 |
L1 | 15. CIT | 2 |
L1 | 16. Deferred tax | 3 |
L1 | 17. Profit after tax | 4 |
L1 | 17. Profit after tax | 4 |
L2 | 14. Profit before tax | 1 |
L2 | 15. CIT | 2 |
L2 | 16. Deferred tax | 3 |
L2 | 17. Profit after tax | 4 |
L2 | % Profit | 5 |
Your data looks like it might be coming from a report in excel. Manipulating data where you have it laid out like a pivot table can introduce some weird kinks.
I loaded this table into your test file and just added some fields to a pivot table
I did not try to replicate your calculations, this was just an example to show how the results "fall out" alot easier if the data is in a form that Power Bi "likes"
This is an example of applying Slogan 1 of the 7 Slogans for working with Power BI. You can find more details here https://bislogans.com/3-shape-your-business-data-before-you-load-it-into-power-bi/
Help when you know. Ask when you don't!
Hi @kel thanks for the help, the report is extracted from a bigger model from SQL Database table
You have 2 possiblities. Talk to the people who are doing the extract and ask them to provide you with an un-pivoted set of data, or use power query inside power bi to unpivot the data before you start analyzing it.
Help when you know. Ask when you don't!
just to make things cliear, here is the dummy table i built to represent the un-povited data
Statement | Account | Result | Order |
L1 | 14. Profit before tax | 67 | 1 |
L1 | 15. CIT | 8 | 2 |
L1 | 16. Deferred tax | 89 | 3 |
L1 | 17. Profit after tax | 55 | 4 |
L1 | 17. Profit after tax | 44 | 4 |
L2 | 14. Profit before tax | 9 | 1 |
L2 | 15. CIT | 344 | 2 |
L2 | 16. Deferred tax | 6 | 3 |
L2 | 17. Profit after tax | 44 | 4 |
L2 | % Profit | 666 | 5 |
Help when you know. Ask when you don't!