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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Preetish_1
Helper I
Helper I

Showing percentage of Column/Row value in 'Line and Stacked Column Chart'

Capture.PNG

 

 

 

Hello everyone,

 

I have a question that is similar to the ones previously asked, but I am unable to find a solution that works.

I have data with different product IDs and thier corresponding Invoice numbers and the month in which they were sold as shown in the image below.

I want to be able to display a Line and Stacked Column Chart.

I want to be able to display one of the product IDs against all the others and get a count of the number of times they were sold. I have been able to do this (as displayed in the image).

In the same visual I also want to be able to show the percentage of Product category M against the month's total sales. Power BI only allows me to display the line as a % of grand total, and not as the % of product sales against the total sales of the month. Is there any other way to achieve this?

Capture1.PNG

 

 

Any help would be greatly appreciated.


Thank you,

Preetish

1 ACCEPTED SOLUTION

Hi Xiaoxin,

 

Thank you for your reply.

I had tried a '100% stacked column chart' earlier, but that was not the exact visual we wanted.

But I was able to figure out a way to achieve it with a couple of measures today.

 

Regards,
Preetish

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @Preetish_1,

 

You can try to switch "line and stacked column chart" to "100% stacked column chart", it will shows the percent of value.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi Xiaoxin,

 

Thank you for your reply.

I had tried a '100% stacked column chart' earlier, but that was not the exact visual we wanted.

But I was able to figure out a way to achieve it with a couple of measures today.

 

Regards,
Preetish

Hi Preetish, 

 

How did you do it?

I used a Measure like this:

% Sales M = DIVIDE ( COUNTROWS(filter(Table, Table[Product ID] = "M")),
   COUNTROWS(Table), 0)

Formatted it as a %, and used it in the visual.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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