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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
0Experience
Helper III
Helper III

Data Labels vs. Total Labels in Clustered Column Charts

Hello,

 

I’m working with a clustered column chart (which visually resembles a stacked column chart), and I’m trying to display the total values for each column.

 

Here’s what I’m aiming for:

  • If I select type 1, I want the chart to show the total value for that column, as illustrated in the screenshot.

0Experience_0-1755709687518.png

 

  • If I select type 1 and type 12, I want the chart to show the combined total for both, again as shown in the screenshot.

0Experience_1-1755709733692.png

 

However, when both options are enabled, I end up with duplicate data labels for each type (e.g., Type 1 and Type 2), which makes the chart cluttered and confusing, see the screenshot for reference.

0Experience_2-1755709787098.png

 

I’m having trouble getting this to work properly. I’ve tried toggling both “Data Labels” and “Total Labels”, but neither gives the desired result.

 

Any suggestions on how to fix this would be greatly appreciated. Power BI file is here.

 

Thank you!

1 ACCEPTED SOLUTION
0Experience
Helper III
Helper III

The code works fine when I kept both Data Labels and Total Labels turned on.

 

 

Data_Label = 
VAR SelectedTypes = ALLSELECTED(type_sort[type])
VAR SelectedCount = COUNTROWS(SelectedTypes)

RETURN
IF(
    SelectedCount = 1 &&
    MAX(type_sort[type]) IN { "type-1", "type-2", "type-3" },
    [describeMeasure],
    BLANK()
)

 

 

If I select only type-1

0Experience_0-1755875480691.png

 

If I select combination of type-1/type-2/type-3

0Experience_1-1755875554024.png

 

If I select only type-12

0Experience_2-1755875603227.png

 

If I select any combination of type-1/type-2/type-3/type-12

 

0Experience_3-1755875660145.png

 

Note: While ChatGPT provided the final working code, I had already shared the initial code, expected output, and other relevant details. It took a few iterations to get everything functioning correctly.

 

Thanks to everyone who engaged with my post and offered helpful suggestions, your input was truly appreciated!

View solution in original post

5 REPLIES 5
0Experience
Helper III
Helper III

The code works fine when I kept both Data Labels and Total Labels turned on.

 

 

Data_Label = 
VAR SelectedTypes = ALLSELECTED(type_sort[type])
VAR SelectedCount = COUNTROWS(SelectedTypes)

RETURN
IF(
    SelectedCount = 1 &&
    MAX(type_sort[type]) IN { "type-1", "type-2", "type-3" },
    [describeMeasure],
    BLANK()
)

 

 

If I select only type-1

0Experience_0-1755875480691.png

 

If I select combination of type-1/type-2/type-3

0Experience_1-1755875554024.png

 

If I select only type-12

0Experience_2-1755875603227.png

 

If I select any combination of type-1/type-2/type-3/type-12

 

0Experience_3-1755875660145.png

 

Note: While ChatGPT provided the final working code, I had already shared the initial code, expected output, and other relevant details. It took a few iterations to get everything functioning correctly.

 

Thanks to everyone who engaged with my post and offered helpful suggestions, your input was truly appreciated!

v-karpurapud
Community Support
Community Support

Hi @0Experience 
Thank you for contacting the Microsoft Fabric Community Forum.
 

We reviewed the PBIX file you provided. To display the totals correctly, you just need to turn off Data labels and keep Total labels on, as @Bmejia  suggested. This will fix the issue.

Please see the attached screenshot for reference.

vkarpurapud_0-1755771052153.png

 

 

I hope this information is helpful. . If you have any further questions, please let us know. we can assist you further.

Regards,
Microsoft Fabric Community Support Team.

@Bmejia @v-karpurapud 

 

Thank you both for your responses.

 

I had already tried the method you suggested before posting. However, when the "Data Label" option is turned off, selecting a single item from the slicer does not display the data value.

 

Please note that the "Total Labels" option is turned on, even though it appears off in the screenshot below when a single selection is made. "Total Labels" automatically turns on when multiple selections are made.

 

0Experience_0-1755772772038.png

 

 

 

Hi @0Experience 

In Power BI stacked column or bar charts, Total labels are visible only when there are two or more series stacked together. If a slicer or filter reduces the chart to a single series, Power BI treats it as a single column, so total labels are hidden. You can enable Data labels to show values for a single series, but when multiple series are selected, this can lead to duplicate labels for each series, which may not be ideal. Currently, Power BI does not allow conditional switching between Data labels and Total labels, so total labels will not appear for single series selections. If needed, you might explore third-party visuals from AppSource, like Enhanced Stacked Column/Bar, which provide more options for custom and conditional label formatting.

Regards,
Karpurapu D.

Bmejia
Super User
Super User

Could you just turn off the Data Labels and leave the Total Labels on.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors