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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
laurent_rio
Helper I
Helper I

How to show Percentage on stacked column chart

Hi,

I want to show percentage in my stacked column chart ; % = component cost (capex,electric cost)/total cost 

Electric Price CapexElectric CostTotal
510.31.3
1010.61.6
1510.91.9
2011.22.2
2511.52.5
3011.82.8

 

Example of column chart i want build and have data label as percentage

 

Capture.JPG

 

Can anyone help, what measure i should write ? I am bit lost (beginner )

Thanks,

 

Rio

1 ACCEPTED SOLUTION
v-yetao1-msft
Community Support
Community Support

Hi @laurent_rio 

Please correct me if I wrongly understood your question.

You can create a measure to get the sum of 'Table'[Electric] and 'Table'[Capex]

Total cost = SUM('Table'[Capex])+SUM('Table'[Electric])

 

Then through  “/to get the percentage

Capex % = SUM('Table'[Capex])/'Table'[Total cost]

Electric % = SUM('Table'[Electric])/'Table'[Total cost]

 

Like this screenshot :

Ailsa-msft_0-1618535996426.png

Then use a 100% stacked column chart visual to show better the percentage of each column .

The effect is as shown:

Ailsa-msft_1-1618536066960.jpeg

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yetao1-msft
Community Support
Community Support

Hi @laurent_rio 

Please correct me if I wrongly understood your question.

You can create a measure to get the sum of 'Table'[Electric] and 'Table'[Capex]

Total cost = SUM('Table'[Capex])+SUM('Table'[Electric])

 

Then through  “/to get the percentage

Capex % = SUM('Table'[Capex])/'Table'[Total cost]

Electric % = SUM('Table'[Electric])/'Table'[Total cost]

 

Like this screenshot :

Ailsa-msft_0-1618535996426.png

Then use a 100% stacked column chart visual to show better the percentage of each column .

The effect is as shown:

Ailsa-msft_1-1618536066960.jpeg

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jihwan_Kim
Super User
Super User

Hi, @laurent_rio 

Please try to use a 100% stacked column chart. It will automatically show the ratio by label inside each column.

 

Thank you.

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

Linkedin: https://www.linkedin.com/in/jihwankim1975/

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

amitchandak
Super User
Super User

@laurent_rio , You can use measures like this in stacked visual and show the value

Capex % = divide(sum(Table[Capex]), sum(Table[Capex])+sum(Table[Electric Cost]))

Electric Cost % = divide(sum(Table[Capex]), sum(Table[Capex])+sum(Table[Electric Cost]))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

October NL Carousel

Fabric Community Update - October 2024

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