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
Anonymous
Not applicable

Grouping in legend and stacked column chart

Hello,

I have the following "Error codes" table loaded in Power Query.

 

DateError code
03/01/2021FS
03/01/2021FS
04/01/2021FS
04/01/2021PO
04/01/2021RO
04/01/2021RO
05/01/2021RO
05/01/2021RO
08/01/2021AD
08/01/2021AD
08/01/2021WO
08/01/2021WO
10/01/2021FP
10/01/2021FP
11/01/2021FP
11/01/2021PO
11/01/2021PO
11/01/2021PO
13/01/2021PO
13/01/2021WO
13/01/2021WO
13/01/2021WR
14/01/2021GS
14/01/2021PD
14/01/2021PD
14/01/2021PO
14/01/2021PO
15/01/2021GS
17/01/2021GS
18/01/2021WR
18/01/2021WR
19/01/2021FT
20/01/2021GF
20/01/2021GF

 

I created the following stacked column chart using the above table:

MakeItReal_0-1657312314974.png

 

The problem is that i am trying to group the error codes (all the codes in a group should be the same colour) and then show the descriptions instead of the error codes in the legend:

  • Tips (FF, FP, FS & FT)
  • Tricks (TC, TN, TD & TM)
  • Games (AD, AF, AS, PE & CC)
  • Keys (WO, WR & WT)
  • Scan (RO)
  • Tech (IT)
  • Recycle (PP)
  • Reboot (PD,PO & PX)
  • Ready (GF & GS)

Any help is much appreciated!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

OK, i managed to solve it by researching and learning about grouping: https://www.youtube.com/watch?v=h_RG4GYqcws

I decided to share the solution instead of just deleting this thread since it could be helpful to others who encounter the same issue.

 

MakeItReal_0-1657326398664.png

 

View solution in original post

2 REPLIES 2
johncolley
Solution Sage
Solution Sage

Hi @Anonymous ,

 

You can use grouping to do this: https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning then use the new grouping column in the legend.

Anonymous
Not applicable

OK, i managed to solve it by researching and learning about grouping: https://www.youtube.com/watch?v=h_RG4GYqcws

I decided to share the solution instead of just deleting this thread since it could be helpful to others who encounter the same issue.

 

MakeItReal_0-1657326398664.png

 

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.