Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
nicocgn
New Member

Graph do not work with measures made with SWITCH function

Hello, I am creating a Financial Statement from zero in PBI where I have a "Profit and Loss" table with just the name of items (like Sales, Cost, earning...) and for each line item I have created a Measure for calculating the amount.

I can build a visualization "Table" where I can associate each line item to the relative measure thanks to an additional measure built with DAX function "Switch". However, the problem arise when I want to create a Line Bar chrart beacuse seems I cannot use the measue and the Profit and loss structure as I have done for the Table. Why is that? 

 

Maybe, should I create an additional Table on PBI composed by two column: one of the Profit and Loss Structure and the other one withe the measure created? How it can be done?

 

thank you

1 REPLY 1
amitchandak
Super User
Super User

@nicocgn , Not very clear. I have a couple videos and a blog on this topic

 

Power BI How to get the P&L formatting right: https://youtu.be/C9K8uVfthUU
Power BI How to get two columns format Profit and Loss Statement(P&L) right: https://youtu.be/WLg85yiMgHI

 

https://medium.com/microsoft-power-bi/power-bi-formatted-p-l-with-custom-sub-totals-and-blank-rows-e...

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors