Forum Discussion
Positioning data labels in Clustered Bar Chart
- 1 year ago
Why do you need a company email address?
Another option, is to use a bar chart
create a second measure with a value of (Label = 1) and place this in the x-axis field well,
under formatting options,
select bar overlap
Add value labels to the Label measure and change the default to be the Rank value.
Make the Label measure transparent and change the measure name in the field well to be a space, so that it doesn't show up in legend
- 1 year ago
Hi mp390988 ,
We are checking in again to see if the workaround from KerKol was helpful in your scenario.Following up on KerKol suggestion I went ahead and tested that workaround and it does achieve your goal of placing:
-
Rank as a data label inside the bar (left-aligned)
-
Sales as a data label outside the bar (right-aligned)
Final Result:
Steps to Implement it:
1. Created a dummy measure:
Label Measure = 12. Created a Rank label measure:
Rank Label = "Rank " & FORMAT(RANKX(ALL('ProductSales'), [Sales Measure], , DESC, DENSE), "00")3. Create a Sales Measure:
Sales Measure = SUM('ProductSales'[Sales])4. Added both measures to the X-axis of a Clustered Bar Chart:
Sales Measure & Label Measure (used for Rank label)
5. Set Bar Overlap to 100%
6. Assigned data labels:
Sales Measure --> Position: Outside End; Value: Sales Measure
Label Measure --> Position: Outside End; Value: Rank Label
Output:
Only one visible bar is shown (Sales), but now:-->Rank appears inside left of the bar
-->Sales remains outside right as expected
This gives the desired two-label effect within Power BI’s native visuals, without using custom visuals like Deneb or Charticulator.
Thanks again to KerKol for the creative suggestion - it worked perfectly.
If this helped, please consider marking it as Accepted Solution so other community members can easily find it.
-
Hi v-veshwara-msft,
Thank you for your response.
This is helpful and I appreciate you saving me time by letting me know that it is not possible to do what I am trying to achieve but I can achieve it using Deneb. The only issue I have is that in order to use Deneb, I need a company email address which I don't have so i'm restricted to using Deneb.
Thank You
Why do you need a company email address?
Another option, is to use a bar chart
create a second measure with a value of (Label = 1) and place this in the x-axis field well,
under formatting options,
select bar overlap
Add value labels to the Label measure and change the default to be the Rank value.
Make the Label measure transparent and change the measure name in the field well to be a space, so that it doesn't show up in legend