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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ThomasSan
Helper III
Helper III

Create bar charts from multiple columns

Hi everyone,

 

I am having sales data in the following form:

UnitGroupCompanySales
A1AC3
A2AC4
B1BC2
B2BC7
B3BC4

 

As you can see company C is divided into groups A and B and these groups are comprised of units A1, A2, B1, B2 and B3.

I want to create a dashboard on unit basis where I would like to show a bar chart that benchmarks the average sales of a specific unit with the performance of the corresponding group and the company in general. It should look like this:

ThomasSan_0-1665137476375.png

"Note, that I am using average sales figures here. In other words, I am not using the table above directly, but use the last column for a measure value. So it is not a question of simply unpivot the table above)

 

I am unsure how to order my data in order to use the PBI bar chart visual to have my (average) sales figures displayed like this. I tried using three seperate bar charts next to each other but PBI would not allow me to modify their design so that their base line are perfectly aligned like in the Excel-chart that you see above. 

 

I am currently thinking about creating a new table where I would use a measure calculating the average sales (depending on the set time frame) on unit, group and company level and let it fill out a new table with "Business Level" and "Average Sales" i.e. something akin to this:

 

Business LevelAvg. Sales
C4
A3.5
B4.3
A13
A24
B12
B27
B34

 

However, I am not sure how to create a table that is being filled with measure values that respond to a time slicer that restricts the average sales figure to a specific time frame.

 

Does anyone know how to accomplish this?

2 REPLIES 2
amitchandak
Super User
Super User

@ThomasSan , refer if this approach can help

Show Grand total row or Avg Grand total row in Visual: https://youtu.be/OSwRZ4GUhxc

 

or unpivot all three column in power query and use

https://radacad.com/pivot-and-unpivot-with-power-bi

Hi @amitchandak,

 

thank you for your reply. I thought unipivot would not help me with changing measures. Or am I mistaken here? 

Also, I watched your videos but are not quite sure how to apply it to my problem case. Could you please give me more input on how to adapt your solution to my problem?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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