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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.