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
shanelthiggs
Regular Visitor

Matrix Column Headers - Measures before Dimension (SSAS)

Hi All

 

Firstly, apologies if this has already been answered/covered in a previous thread; I've not managed to find anything thus far and did try to (probably wrongly) tag on to a different question in the hope of a solution.

 

As an example, we can have a list of regions/locations, and then by month show the measures volume and revenue. These will appear as what I would call a secondary header, or sub-heading beneath the months, so you end up with volume and revenue per month. What we would like to be able to do, is reverse the header logic in this scenario, so that we end up with each month per measure, i.e. Volume - September, October, November / Revenue - September, October, November.

 

We can do this using our existing SSAS product, as demonstrated in my images below, where we are able to drag the measures into the columns section (can be done for rows also), and position them after OR before the dimension header. The first image is what we can replicate in PBI, and the second image is what we'd like to be able to do.

 

Dimension Headers Primary / Measures Headers SecondaryDimension Headers Primary / Measures Headers SecondaryMeasures Headers Primary / Dimensions Headers SecondaryMeasures Headers Primary / Dimensions Headers Secondary

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks for any help in advance.

 

Shane

1 ACCEPTED SOLUTION

HI @shanelthiggs,

 

I think you need some additional steps to achieve your requirement.

 

Steps:

1. Enter to query editor.

2. Choose 'Volume units' and 'Revenue Net', then use 'unpivot columns' feature to transfer them to attribute and value.
3. Save change and return to report view.

4. Drag attribute to column fields and value to value field.(notice: resort column filed and mark sure month column is in the bottom)

 

BTW, if 'Volume units' and 'Revenue Net' means measures, it is impossible to achieve your requirement. Current power bi can't use measure on row or column fields.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

7 REPLIES 7
CheenuSing
Community Champion
Community Champion

Hi @shanelthiggs

 

Try this.

 

1. Create a table with columns as ID and Name.  With values as 1, Volume and 2, Revenue

2. In the modelling tab , set the sort order for the Column Name as ID.

3. Use the Name as Row , followed by Month

4. In the values put the measures - Sales and Revenue.

 

If this works please accept this as solution and also give KUDOS.

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Hi @CheenuSing - thanks for the reply.

 

I'm not sure that's going to work for us, as we're linking directly to a SSAS Cube for the data to form the matrix. The below might explain a little more what I'm hoping to achieve; effectively, get the values as columns.

 

In the third image, on the left hand side (1) is the output we're given, and the right hand side (2) is the output we'd like to be able to achieve.


Thanks

Shane

 

CurrentCurrentDesiredDesiredDesired OutputDesired Output

 

 

How did you achieve what's in your 1st screenshot.

I'm getting such arrangement with measure values as row lables. Is there a matrix setting that I need to apply to achieve the screenshot#1 look?

Are you Units and Revenue measures? Appreciate your feedback.

Never mind. If I turn off "Show on Rows" in Values section, I get the desired output.

HI @shanelthiggs,

 

I think you need some additional steps to achieve your requirement.

 

Steps:

1. Enter to query editor.

2. Choose 'Volume units' and 'Revenue Net', then use 'unpivot columns' feature to transfer them to attribute and value.
3. Save change and return to report view.

4. Drag attribute to column fields and value to value field.(notice: resort column filed and mark sure month column is in the bottom)

 

BTW, if 'Volume units' and 'Revenue Net' means measures, it is impossible to achieve your requirement. Current power bi can't use measure on row or column fields.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hello,

 

I am trying to do the exact same thing. Does the feature now exist for measures ? 

 

Referring to that : "BTW, if 'Volume units' and 'Revenue Net' means measures, it is impossible to achieve your requirement. Current power bi can't use measure on row or column fields."

 

I am trying to do something easily done on Pivot Table in excel. When we have multiple "measures" and columns category: we just need to change the order of the "value" in the column to put it in first position. So our "values from measures" are shown as the first level of hierarchy.

Can we do something similar in a Matrix in Power BI?

Thank you!

Thank you @v-shex-msft - they are measures so as you said, will not be possible to achieve this in current versions.

 

Accepted as solution.

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.