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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Horizontal Stacked bar chart - unable to see y-axis values

Hello,

My horizontal stacked bar chart works correctly, but the the y-axis does not display all the possible values.

For example, I have 4 different period data classification and has 3 different color coding to differentiate each stage in each period.

 

3 color codes - New (black), In Progress (Green), Completed (Blue)

4 different periods are - Jan - Mar, Apr - June, Jul - Sep, Oct - Dec

 

So the number of tasks allocated by a department is showing correctly for color coding and for the periods but on my Y-axis I am able to see only Apri-June as the level.

 

appreciate if someone please advise or guide me if I am missing something to unhide or remove filters?

 

Thanks

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

(1) In the Home tab, click on “Transform data” to go to the Power query. This is my test data.

vtangjiemsft_0-1727418542792.png

(2) Select the “color” column and click “unpivot other columns”.

vtangjiemsft_1-1727418668421.png

(3) Click “Group by” and set it as shown in the figure.

vtangjiemsft_3-1727418710058.pngvtangjiemsft_4-1727418750704.pngvtangjiemsft_5-1727418763751.png

(4) Click Close and Apply in the Home tab and go back to PBI Desktop, then you can follow my last reply and create the calculated column and then the visual objects.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

 

 

 

View solution in original post

12 REPLIES 12
v-tangjie-msft
Community Support
Community Support

Hi @Anonymous ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1727234349495.png

(2) We can create a calculated column.

Column = SWITCH('Table'[Periods],
"Jan - Mar","Cherry st",
"Apr - June","strawberry mall",
"Jul - Sep","peach st",
"Oct - Dec","lime av")

(3) Then the result is as follows.

vtangjiemsft_1-1727234400801.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) 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.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Anonymous
Not applicable

hi @v-tangjie-msft  - thanks for such a detailed reply, I have tried the steps but it does not work.

Will try to create a sample data and share.

 

Hi @Anonymous ,

 

Could you tell me if your problem has been solved?  If resolved, please share your solution.  More people will benefit from it. If not, please provide your example data and expected results.

 

Best Regards,

Neeko Tang

Anonymous
Not applicable

Hi @v-tangjie-msft - probably near to the solution but my data is slightly different.

For example the period is a column heading, and the task closed during that period gets counted as 1, if not closed it will be zero. My problem is how do I combine these calculated columns to one column as you have shown above such that the y-axis can show each the sum (or aggregate) of each period bars whether there is data or not. Currently, I can see the bars correctly but the heading will only show one period name on the left. It is actually considering it as hierarchy instead of individual y axis points / levels.

 

Jan - Mar     Apr-Jun

1                    0

0                    1

1                    1

1                    0

0                    1

1                    1

 

Hi @Anonymous ,

 

(1) In the Home tab, click on “Transform data” to go to the Power query. This is my test data.

vtangjiemsft_0-1727418542792.png

(2) Select the “color” column and click “unpivot other columns”.

vtangjiemsft_1-1727418668421.png

(3) Click “Group by” and set it as shown in the figure.

vtangjiemsft_3-1727418710058.pngvtangjiemsft_4-1727418750704.pngvtangjiemsft_5-1727418763751.png

(4) Click Close and Apply in the Home tab and go back to PBI Desktop, then you can follow my last reply and create the calculated column and then the visual objects.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

 

 

 

Anonymous
Not applicable

@v-cgao-msft  - please could you assist? I have 4 formulas as different period and I want to show them as per the sample image above on yaxis. I was able to do this in tableau easily but Power BI does not show in similar format unless they are grouped as one, will that work? Please advise.

Anonymous
Not applicable

Do I need to use SWTICH Formula to combine the different periods?

see this link

 

https://ironic3d.com.au/categorical-charts/stacked-bar-chart

Anonymous
Not applicable

For example this is the final output I am looking to achieve in the stacked bar chart but it does not show the individual levels on the Y axis like below Cherry St, Strawberry mall, Peach St., etc

 

ashraparas_0-1727088617276.png

 

Anonymous
Not applicable

Please note that the bars are visible, just the level name is not

ebee
Helper I
Helper I

Hi,

 

Can you provide a screenshot of the problem?

Anonymous
Not applicable

@ebee - see above

It is not a screenshot of the problem, but of a hoped for end result instead.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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