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

Multiple groupings for Column Headers

Is it possible to do Multiple groupings for columns in Power BI as shown in the image below.
Are there any work arounds for this scenario?

MultipleColumnHeaders.JPG

Sample Excel Sheet

 Thanks in Advance!

 

 

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @Anonymous

 

You may use 'Unpivot columns' in query editor. Attached the sample file for your reference.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

11 REPLIES 11
v-cherch-msft
Employee
Employee

Hi @Anonymous

 

You may use 'Unpivot columns' in query editor. Attached the sample file for your reference.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I was able to get this to group but how do you move other columns around to order them like I want? It seems to just put them in however it wants. 

You need to had a column with the sorting number and then make a sort by another column:

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column?tabs=powerbi-deskto...


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Your Rock! Thanks, now how do I get rid of the column headers for those rows?  Like the word Group and Sort and the 1,2,3 etc.  Sort.PNG

Hi @Jveselka,

 

You don't need to place the sorting column on the visual if you use the sort by other column that will work properly. 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Ok, I'll see if I can do that. Now for another question.  I'm new to DAX so here is an example of the conditional column I created to group two columns.  I need the data in those two columns to be a calculation.  How do I add that in to DAX statement or is there another way.  

 

= Table.AddColumn(#"Unpivoted Other Columns", "Group", each if [Attribute] = "AppsPD" then "Life Apps" else if [Attribute] = "Apps" then "Life Apps" else null)

 

Example - 

APPS PD = Standards[AppsPD]*[TruncPeriod]/12
Apps1 = Standards[Apps]*[TruncPeriod]/12
 

Hi @Jveselka ,

 

Not sure what you want to calculate, you refer dax however you send a code with M language (power query)

 

What is the final result you want to achieve?


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Grouped columns 1 and 2 and columns 4 and 5 need a calculation added. This is based on the period they select.  I have a column the strips off the month in the period. 202305 for the calculation

TruncPeriod = MID('Standards'[Period],5,7)
Apps1 = Standards[Apps]*[TruncPeriod]/12
 
So using grouped column 1.  This needs to group the two columns and do a calc for each 

Example - 

APPS PD = Standards[AppsPD]*[TruncPeriod]/12
Apps1 = Standards[Apps]*[TruncPeriod]/12
 
I can do this using a table visual but not sure if it will work with the matrix visual.
 
Jveselka_0-1699977820391.png

 

HI @Jveselka 

 

This should also work for a matrix, you may need to had a group column to your model in order to have everything correctly presented on the matrix, but shous work.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix
Super User
Super User

Hi @Anonymous

 

Believe that you are talking about making a visual with that similar look? You should use the Matrix visual and add the number of columns/rows you need to achieve the hierarchy that you want.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Hi @MFelix

Yes, I'm trying to create a visual with similar look.
I want the Launch Date, Launch Approval columns under 'Launch' grouping and Approval Status, Testing Status columns under 'Status' grouping.
Can you please provide the steps on how to achieve this in a matrix visual?

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.