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
bo_afk
Post Patron
Post Patron

Matrix formatting

Hi,

 

I have the following data and am trying to create a matrix to display the demand with day as row values and the market and year as column values.

 

In addition to this, I would also like to display the year on year change for each day and market for which i've created a measure for

 

YearDayMarketDemand
2019MondayUK120,000
2019TuesdayUK115,000
2018MondayUK130,000
2018TuesdayUK113,000
2019MondayUS60,000
2019TuesdayUS72,000
2018MondayUS56,000
2018TuesdayUS83,000

 

Measure.JPG

 

However, when I create the matrix with the 'vs LY' measure, it adds this measure after every year column, but I only want to add this at the end of each market column.

 

Actual:

Matrix Screenshot.JPG

Expectation:

 UK  US  
 20192018vs LY 20192018vs LY 
Monday120,000130,000-8%60,00056,0007%
Tuesday115,000113,0002%72,00083,000-13%

 

Is this possible?

 

Thanks

afk

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

HI, @bo_afk 

Yes, you could get it.

just adjust it as below:

Create two SUM measure for 2018 and 2019 

2018 = CALCULATE(SUM(Table1[Demand]),Table1[Year]=2018)
2019 = CALCULATE(SUM(Table1[Demand]),Table1[Year]=2019)

Then drag these two measure into Value instead of drag [Demand] directly, and remove Year column from the visual.

2.JPG

1.JPG

3.JPG

and here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
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

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

HI, @bo_afk 

Yes, you could get it.

just adjust it as below:

Create two SUM measure for 2018 and 2019 

2018 = CALCULATE(SUM(Table1[Demand]),Table1[Year]=2018)
2019 = CALCULATE(SUM(Table1[Demand]),Table1[Year]=2019)

Then drag these two measure into Value instead of drag [Demand] directly, and remove Year column from the visual.

2.JPG

1.JPG

3.JPG

and here is sample pbix file, please try it.

 

Regards,

Lin

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

Thanks for the response Lin.

 

Although, I have a lot of metrics in my report which means I need to create multiple 2018/2019 measures for each metric, but I guess this is the only option for now and does the job I need it to do.

 

👍

hi @bo_afk 

Could you please tell me you still have other problem? If not, could you please mark the helpful replies as Answered?  😁

 

Regards,

Lin

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

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.