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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
mp390988
Helper IV
Helper IV

Positioning data labels in Clustered Bar Chart

Hi,

 

I have 2 labels on my bar chart. One under Value which contains my measure Sales. Then another label under Detail which contains my Rank. 

 

mp390988_0-1746731166171.png

 

I want to position the Rank on the left inside the bar and keep my Sales on the right outside the bar. Currently, both labels are aligned next to each other as shown in the photo.

 

mp390988_1-1746731533158.png

 

 

mp390988_2-1746731767646.png

 

Is there a way to position the data label under details?

2 ACCEPTED SOLUTIONS

Why do you need a company email address?

 

Another option, is to use a bar chart

KerKol_1-1746848202913.png

 

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

KerKol_2-1746848289488.png

 

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

 

KerKol_0-1746848177153.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

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:

vveshwaramsft_0-1747915487646.png

 

Steps to Implement it:

1. Created a dummy measure:

Label Measure = 1

 

2. 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%

vveshwaramsft_1-1747915772185.png

 

6. Assigned data labels:

Sales Measure --> Position: Outside End; Value: Sales Measure

Label Measure --> Position: Outside End; Value: Rank Label

vveshwaramsft_2-1747915980445.png

 

vveshwaramsft_3-1747916062170.png

 

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.

 

View solution in original post

6 REPLIES 6
v-veshwara-msft
Community Support
Community Support

Hi @mp390988 ,

Following up to see if your query has been resolved. If any of the responses helped, please consider marking the relevant reply as the 'Accepted Solution' to assist others with similar questions.

If you're still facing issues, feel free to reach out.

Thank you.

v-veshwara-msft
Community Support
Community Support

Hi @mp390988 ,

Just checking in to see if you query is resolved and if any responses were helpful. If so, kindly consider marking the helpful reply as 'Accepted Solution' to help others with similar queries.

Otherwise, feel free to reach out for further assistance.

Thank you.

Also thanks @KerKol for your response and inputs.

mp390988
Helper IV
Helper IV

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

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:

vveshwaramsft_0-1747915487646.png

 

Steps to Implement it:

1. Created a dummy measure:

Label Measure = 1

 

2. 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%

vveshwaramsft_1-1747915772185.png

 

6. Assigned data labels:

Sales Measure --> Position: Outside End; Value: Sales Measure

Label Measure --> Position: Outside End; Value: Rank Label

vveshwaramsft_2-1747915980445.png

 

vveshwaramsft_3-1747916062170.png

 

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.

 

Why do you need a company email address?

 

Another option, is to use a bar chart

KerKol_1-1746848202913.png

 

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

KerKol_2-1746848289488.png

 

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

 

KerKol_0-1746848177153.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




v-veshwara-msft
Community Support
Community Support

Hi @mp390988 ,

Thanks for posting your query in Microsoft Fabric Community.

As of now, Power BI doesn’t support independent positioning of multiple data labels on a single bar - meaning you can’t place one label (like Rank) inside the bar on the left and another (like Sales) outside the bar on the right.

 

That said,

I tried to replicate your scenario using a workaround in the default clustered bar chart. Here's what I did:

 1. Created a calculated Rank column using RANKX().
 2. Concatenated the Rank and Product Name into a new column.
 3. Used this as the Y-axis to simulate Rank being on the left.
 4. Kept Sales as the X-axis with data labels shown outside right.

 

Clustered Bar Chart with Rank:

 vveshwaramsft_1-1746782269256.png

Measures used:

Product with Rank = FORMAT('ProductSales'[Sales Rank], "00") & " - " & 'ProductSales'[EnglishProductName]

Sales Rank = RANKX( ALL('ProductSales'), 'ProductSales'[Sales], , DESC, DENSE ) 

 

While this approach does place the rank to the left, it's technically part of the axis label - not a true data label inside the bar. So, I understand this may not fully meet your intended visual goal.

 

To achieve precise placement like, Rank inside the bar (left-aligned) and Sales outside (right-aligned)

You can consider using a custom visual like: Deneb (Vega-Lite based) or Charticulator

These visuals allow full control over label positioning and layout, which isn’t possible with the default visuals.

 

Hope this helps. Please reach out for further assistance.
If this post helps, then please consider to Accept as the solution to help the other members find it more quickly and a kudos would be appreciated.

 

Thank you.

 

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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