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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
CTH2022
Frequent Visitor

Label on stacked column chart

Have the following data set.

 

Apple 10

Orange 20

Mango ALL

 

How to show ALL as label on the chart?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @CTH2022 ,

I updated the sample pbix file(see attachment), please check whether that is what you want. You can update the formula of Measure as below, the part with red font is updated ones....

Measure =
VAR _fruitswithall =
CALCULATETABLE (
VALUES ( 'Table'[Fruit] ),
FILTER ( 'Table', 'Table'[Type] = "ALL" )
)
RETURN
IF (
SELECTEDVALUE ( 'Table'[Fruit] ) I_fruitswithall,
"ALL",
CONCATENATE ( [Count], "" )
)

yingyinr_0-1649990622507.png

Best Regards

View solution in original post

8 REPLIES 8
CTH2022
Frequent Visitor

CTH2022_0-1649943117655.png

Say if  the data is updated as follow the next day, I want A:LL to be shown on Orange bar. Is there a way to change to measure to take care of this automatically?

Anonymous
Not applicable

Hi @CTH2022 ,

I updated the sample pbix file(see attachment), please check whether that is what you want. You can update the formula of Measure as below, the part with red font is updated ones....

Measure =
VAR _fruitswithall =
CALCULATETABLE (
VALUES ( 'Table'[Fruit] ),
FILTER ( 'Table', 'Table'[Type] = "ALL" )
)
RETURN
IF (
SELECTEDVALUE ( 'Table'[Fruit] ) I_fruitswithall,
"ALL",
CONCATENATE ( [Count], "" )
)

yingyinr_0-1649990622507.png

Best Regards

Yes..This is what I wanted to to do. Thanks for the great hlep.

Anonymous
Not applicable

Hi @CTH2022 ,

The label of the stacked column chart requires the value of the numeric type, and obviously the field with the value "ALL" is a Text type field. We can put this field under the Legend option. This is shown in the figure below.

yingyinr_0-1649389579441.png

In addition, you can refer the following thread.

Stacked column chart with text as data labels

If the above one can't help you get the desired result, please provide some sample data refer in your stacked column chart with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

How to upload PBI in Community

Best Regards

PowerNiquestion.JPG

Hi, Attached a picture to clarify the question.  Is the a way to display "ALL" for items with "ALL" as entry in coulmn B? Or is there is better visual that can be used for this kind of situation?

Anonymous
Not applicable

Hi @CTH2022 ,

I updated my sample pbix file(see attachment), please check whether that is what you want.

1. Create a measure as below

Measure = IF(SELECTEDVALUE('Table'[Fruit])="Mango","ALL",CONCATENATE([Count],""))

2. Create a Infographic Designer visual

3. Set the text and bind to the new created measure in previous step just as below screenshot

yingyinr_0-1649748138872.png

In addition, you can refer the following thread to get it.

Power BI - Visuals that support custom data labels like Tableau

yingyinr_1-1649748210211.jpeg

Best Regards

The measure works only if we know the data for Mango is "ALL" . Can this measure be changed to  work on any kind of fruit as we can not sure which one will have "ALL" in the entry.

Anonymous
Not applicable

Hi @CTH2022 ,

Can I know the backend logic of "ALL"?  When and which the label of fruit need to dispaly as "ALL"?

Best Regards

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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