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
SamTrott
Helper I
Helper I

Replicate chart in Excel in Power BI

In Excel I can create a chart that looks like this, it shows me the top 5 Categories along with the top 5 sub categories for each category. Note how the category labels appears underneath as a kind of parent header rather than on every sub category label

slide10excel.png

 

However when I try to make this in Power BI the ranking seems all over the place. If I have just Category in the axis than the rank I've setup displays the top Five just fine, likewise for Sub-category. But when I have both Category and Sub-Category it goes all wonky. Additionally rather than show a header label for Category it adds the Category label to every Sub-Category label making it far messier.   

slide10bi.png

 

I've seen BI charts using dates display it similar to how Excel does above so I assume such a thing is possible.

 

The Ranks I'm using are just 

Rank Category by closed incidents = RANKX(ALL(IncidentsClosed[Category]),[Count of Incidents Closed])
&
Rank Sub-Category by closed incidents = RANKX(ALL(IncidentsClosed[Sub-Category]),[Count of Incidents Closed])
 
I assume these are going to need changing.
4 REPLIES 4
Greg_Deckler
Super User
Super User

It is supposed to work like this:

 

https://community.powerbi.com/t5/Desktop/X-Axis-Label-Hierarchy/m-p/841928#M404293

 

I posted this as an issue.

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Indeed I've tried that and it didn't work. If its not broken then perhaps its something to do with my fields as like the example you provided its dates, I've not seen it work with text based fields before, though I would think it used the same logic. 

 

I even tried creating a heiarchy using the two fields but it didn't seem to have any affect on how they displayed. 

Okay I've managed to fix the labels. If I place Category and Sub-Category into a heirarchy and then turn Concatenate off it fixed the labels however the Rank's still appear to not be working as intended.

 

I need top 5 cateogries and top 5 sub categories of each of the top 5 categories as shown in the Excel image in the main post. Current rank measures are written above for refernece, presumably they need some modifying.

 

fixedlabels.png

Greg_Deckler
Super User
Super User

I would say to turn off "concatenate labels" in X axis but that appears to have zero effect, I wonder if it is broken?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.