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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
DanGiles
Regular Visitor

Need help setting up bar chart in PowerBi dashboard

Hello, 

I am new to PowerBI and I am attempting to set up a dashboard for a work-based project, but have been having some difficulty wokring out how to present data in a specific way. The actual data I am using is sensitive so I have put together some dummy data to attempt to explain what I would like to do. 

 

I currently have data loaded into the Dashboard in the following format. It has a unique ID (Car_Reg), some nominal (categorical) data (Car_Size), and then the rest of the columns show whether the vehicle needs any work done using a simple yes/no (new tyres/lights, etc).

DanGiles_1-1695894018603.png

I also have the dataset below which is dependent on the data above, and uses some separate cost information to calculate the cost of any required improvements based on the vehicle size. All cells which had a 'yes' are now converted to the relevant cost, all the 'no's remain as £0.00.

DanGiles_0-1695893672011.png

 

In the dashboard for this data I was planning on having a bar chart which shows the overall cost of improvements for all vehicles in the database, with the type of improvement on the Y-axis, cost on the X-axis, and the car size used in the legend to break-down the data. I know how develop this chart in Excel (see below), but want to have an interactive version in my PowerBI dashboard.

DanGiles_2-1695894239648.png

 

What I am struggling with is that currently all of the different improvement types are in separate columns ("New_Lights?", "New_Tyres", i.e.). I also want to make sure that the data presented in the bar chart is linked to everything else so that I can click on the various elements within the bar chart to filter all of the other visualisations on the dashboard. For example, I also have a map which shows the location of each of the vehicles and it would be great if when I clicked on the the 'Large' vehicles part of the 'New Lights' bar, it would highlight all of the large vehicles which require new lights on the map.

I hope this makes sense. 

Thanks, 

Dan

 

1 REPLY 1
whitch
Resolver I
Resolver I

I think you want this:

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882...

 

Convert your separate new lights/newtyres/new paint columns into one 'work type' column using unpivot in Power Query.

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.