Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello community,
I would like to create a '100% stacked bar chart' wich shows both number and percentage with the "; " or "---" between them! Is that a method to do it?
Thank You!
Solved! Go to Solution.
Step 1) Create a combined label:
Value & % =
FORMAT([Total Value], "#,##0")
& " ("
& FORMAT([% of Total], "0.0%")
& ")"
Step 2) Enable Data labels → Values → Custom label and use the combined measure.
No problem - then you'll need to do a measure here which is composed of the value and percentage
ValueWithPercentage =
VAR CurrentValue = SUM(YourTable[YourValueColumn])
VAR TotalValue = CALCULATE(SUM(YourTable[YourValueColumn]), ALLSELECTED(YourTable[YourCategoryColumn]))
VAR Percentage = DIVIDE(CurrentValue, TotalValue, 0)
RETURN
CurrentValue & " - " & FORMAT(Percentage, "0%")
Something like this should work. Basically you want CurrentValue to calc the number, TotalValue to calc the denomenator, then Percentage from the previous two.
The last line then formats them together. Have a play and you should be able to get this to work, then put this field into the Value for the chart.
Hi @HaiVN ,
We haven’t received a response from your end yet. Please let us know whether the issue has been resolved or if you’re still facing any difficulties. Feel free to reach out if you need further assistance.
Thank you.
Hi @HaiVN ,
@cengizhanarslan , has correctly responded to the query. If you continue to experience any issues or need further clarification, please feel free to let us know.
Thank you for your helpful response, @cengizhanarslan @danextian .
Regards,
Yugandhar
Step 1) Create a combined label:
Value & % =
FORMAT([Total Value], "#,##0")
& " ("
& FORMAT([% of Total], "0.0%")
& ")"
Step 2) Enable Data labels → Values → Custom label and use the combined measure.
Hi @HaiVN
You can turn on value from the label options
@danextian @JamieHolding I am sorry I posted wrong message! I mean I need "; " or "---" between number and persentage! I have edited post!
No problem - then you'll need to do a measure here which is composed of the value and percentage
ValueWithPercentage =
VAR CurrentValue = SUM(YourTable[YourValueColumn])
VAR TotalValue = CALCULATE(SUM(YourTable[YourValueColumn]), ALLSELECTED(YourTable[YourCategoryColumn]))
VAR Percentage = DIVIDE(CurrentValue, TotalValue, 0)
RETURN
CurrentValue & " - " & FORMAT(Percentage, "0%")
Something like this should work. Basically you want CurrentValue to calc the number, TotalValue to calc the denomenator, then Percentage from the previous two.
The last line then formats them together. Have a play and you should be able to get this to work, then put this field into the Value for the chart.
Yes.
To show the value, go into Data labels>Value>Turn it on
To show the %, go into Data labels>Detail>Turn it on>Change Content to Percent of Total
Format each one however you'd like.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |