bar chart switch

Forum home » Delegate support and help forum » Microsoft Power BI training and help » Bar Chart - "Switch X and Y axis"

Bar Chart - "Switch X and Y axis"

resolvedResolved · Urgent Priority · Version 2016

Benjamin has attended:
Power BI DAX course

Bar Chart - "Switch X and Y axis"

Dear all,

I have a table with many columns and have created various graphs out of it with slicers which I would also like to use for the issue I will now explain.

Below an extract from my data set.

Product - Quantity - Sales - GM - Award Status
A - 100 - 1000 - 500 - won
B - 100 - 1000 - 800 - lost
C - 100 - 1000 - 200 - pending
A - 100 - 1000 - 500 - lost

I would now like to put this into a stacked bar chart, with Quantity, Sales, GM on the X axis.
Each bar chart is then supposed to have 3 parts reflecting won, lost, pending.

Using the data in it´s original format does my bar chart bring the Award status on the x axis, which is not what I am looking like. I guess I will need to generate a new "support" table in order to get this done, but I don´t know how.

I hope you can help me with this one.

Thank you
Benjamin

RE: Bar Chart - "Switch X and Y axis"

Hi Benjamin,

Thank you for the forum question.

If I understand you right you need a reference query to turn your data to be able to get the chart you want.

1 Open the query editor.
2 Right click the table in the left pane and click Reference.
3 In the reference query move the Award Status column so it is the first column.
4 Select the Award Status and the Product columns.
5 Right click one of the headings of the selected columns and click Unpivot other columns.
6 On the Home tab in the query editor click Close & Apply.
7 Create a stacked bar chart.
8 Add Attribute to Axes, Award Status to Legend, and Value to Values



Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Thu 15 Apr 2021: Automatically marked as resolved.

 

Training courses

 

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Power BI tip:

Master DAX (Data Analysis Expressions)

DAX is the formula language used in Power BI for creating custom calculations and aggregations. Invest time in learning DAX to unlock the full potential of Power BI. Understand functions like CALCULATE, FILTER, and SUMX, as they are fundamental for creating complex calculations and measures.

View all Power BI hints and tips


Server loaded in 0.07 secs.