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

Create matrix row header

Hello,

 

I am an absolute beginner in Power BI and only have a week of experience.

 

I have two data tables which have a relationship with a common date table, and I've created a matrix that shows the values appropriately. But I wish to create a super heading for each group of values.

 

To provide an illustration, 

 

The first data table is called "Physical Sales" and is built as follows

DateTypeRevenueCost
1/1/2021Physical101
2/1/2021Physical112
3/1/2021Physical123

 

The second data table is called "Online Sales" and is built as follows

DateTypeRevenueCost
1/1/2021Online2011
2/1/2021Online2112
3/1/2021Online2213

 

Both data tables are linked to a date table that has a single column [Date] which starts from 1/1/2021.

(i.e. 'Physical Sales'[Date] and 'Online Sales'[Date] both have a many to one relationship with 'Date Table'[Date])

 

My current matrix looks like this 

 1/1/20212/1/20213/1/2021
Revenue101112
Cost123
Revenue202122
Cost111213

The configurations for this matrix are

Row: -None-

Columns: 'Date Table'[Date]

Values: 'Physical Sales'[Reveue], 'Physical Sales'[Cost], 'Online Sales'[Revenue] and 'Online Sales'[Cost]

The format option "Show on rows" is active

 

The matrix I would like to create would look like this:

  1/1/20212/1/20213/1/2021
PhysicalRevenue101112
(Merged with cell on top)Cost123
OnlineRevenue202122
(Merged with cell on top)Cost111213

 

The problem seems really simple but I just cant find the option/method to do it. I really appreciate any input or help on this!

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @JayBI 

You need to build a hierachy in martix row. Try Append function to build a new table and transform the table by Unpivote in Power Query Editor .

Append:

1.png

Select Revenue and Cost columns and use Unpivote in Transform.

3.png

Then build a matrix as below. Don't forget to turn off stepped layout function in Format.

4.png

Best Regards,

Rico Zhou

 

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

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @JayBI 

You need to build a hierachy in martix row. Try Append function to build a new table and transform the table by Unpivote in Power Query Editor .

Append:

1.png

Select Revenue and Cost columns and use Unpivote in Transform.

3.png

Then build a matrix as below. Don't forget to turn off stepped layout function in Format.

4.png

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

amitchandak
Super User
Super User

@JayBI , You have tp create a table like this and use that for display

 

union(
summarize('Table', Table[Date],"Measure","Physical","revenue",sum('Physical Sales'[Reveue]),"cost",sum('Physical Sales'[Cost])),
summarize('Table', Table[Date],"Measure","Online","revenue",sum('Online Sales'[Reveue]),"cost",sum('Online Sales'[Cost]))
)

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.