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

Centre a matrix grid on a column

Hi

 

I have a data table with products and dates (Year and Month) and quantities. I have used a matrix gird to pivot it with year and month as column headers. The date range from 2017 to 2022. When a product is chosen I would like the grid to show the current year and month in the centre of the grid. Currently it just loads the grid and the horizontal scroll bar defaults to the left.

 

Any suggestiosn weolcome. Thanks.

 

 

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can create a filter measure like DAX below, then put measure Filter1 in the Visual Level Filter of Matrix visual, and setting the Filter1 as "is not blank".

 

Filter1= IF(YEAR(MAX(Table1[Date]))=YEAR(TODAY())&&MONTH(MAX(Table1[Date]))=MONTH(TODAY()), 1, BLANK())

 

Filter1_is not blank.png

 

 

 

 

 

 

 

 

 

or could you share your current output and expected output? You can also upload it to OneDrive or Dropbox and post the link here. 

How to Get Your Question Answered Quickly

 

Best Regards,

Amy

 

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-xicai
Community Support
Community Support

Hi  @Anonymous ,

 

Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

 

Best regards

Amy

v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can create a filter measure like DAX below, then put measure Filter1 in the Visual Level Filter of Matrix visual, and setting the Filter1 as "is not blank".

 

Filter1= IF(YEAR(MAX(Table1[Date]))=YEAR(TODAY())&&MONTH(MAX(Table1[Date]))=MONTH(TODAY()), 1, BLANK())

 

Filter1_is not blank.png

 

 

 

 

 

 

 

 

 

or could you share your current output and expected output? You can also upload it to OneDrive or Dropbox and post the link here. 

How to Get Your Question Answered Quickly

 

Best Regards,

Amy

 

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.