March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet 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
Hi,
I want to show percentage in my stacked column chart ; % = component cost (capex,electric cost)/total cost
Electric Price | Capex | Electric Cost | Total |
5 | 1 | 0.3 | 1.3 |
10 | 1 | 0.6 | 1.6 |
15 | 1 | 0.9 | 1.9 |
20 | 1 | 1.2 | 2.2 |
25 | 1 | 1.5 | 2.5 |
30 | 1 | 1.8 | 2.8 |
Example of column chart i want build and have data label as percentage
Can anyone help, what measure i should write ? I am bit lost (beginner )
Thanks,
Rio
Solved! Go to Solution.
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 :
Then use a 100% stacked column chart visual to show better the percentage of each column .
The effect is as shown:
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.
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 :
Then use a 100% stacked column chart visual to show better the percentage of each column .
The effect is as shown:
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.
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.
@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]))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
121 | |
99 | |
88 | |
70 | |
61 |
User | Count |
---|---|
140 | |
121 | |
106 | |
98 | |
94 |