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
PBE
Helper II
Helper II

Dynamic Matrix Column Month Header

Hi

I would like matrix column names to change in relation to current month.

If current Month is November I would like column headings to be

Account          November October September

ABC001                 100          120         90    

If current month is December headings to be

Account          December November October

ABC001                 100          120         90    

To show figures for current and previous two months. I can produce the figures I don't know how to make column headers dynamic.

Rather than have to retype them when the date changes to a new month.

The account and figures are just for information and do not affect the column heading.

 

Is it possible to change matrix column heading using a formula or some other way?

 

Thank you in advance

 

Pete

3 ACCEPTED SOLUTIONS
djurecicK2
Super User
Super User

In a Matrix, put Month Name in Columns, then add a date slicer and limit to the last 3 months. 

djurecicK2_0-1667943979111.png

 

View solution in original post

djurecicK2
Super User
Super User

@PBE Thanks for the Kudos! Can you please accept as solution if this has solved the issue?

View solution in original post

v-yadongf-msft
Community Support
Community Support

Hi @PBE ,

 

Please enable field parameters in preview features:

vyadongfmsft_7-1668394931532.png

 

 

This is my test table:

vyadongfmsft_0-1668394216263.png

 

Create tewo measures:

Nov = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Month] = "Sep" || 'Table'[Month] = "Oct" || 'Table'[Month] = "Nov"))

Dec = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Month] = "Dec" || 'Table'[Month] = "Oct" || 'Table'[Month] = "Nov"))

 

Select "Fields" in Modeling tab:

vyadongfmsft_1-1668394399277.png

Add two measure just created.

vyadongfmsft_2-1668394482505.png

You will get a parameter table like this:

vyadongfmsft_3-1668394541917.png

 

Create a slicer using parameter just created and create a matrix as below shown:

vyadongfmsft_4-1668394667164.png

 

Then you can Dynamic Matrix Column Month Header:

vyadongfmsft_5-1668394765423.png

vyadongfmsft_6-1668394788782.png

Best regards,

Yadong Fang

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

4 REPLIES 4
v-yadongf-msft
Community Support
Community Support

Hi @PBE ,

 

Please enable field parameters in preview features:

vyadongfmsft_7-1668394931532.png

 

 

This is my test table:

vyadongfmsft_0-1668394216263.png

 

Create tewo measures:

Nov = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Month] = "Sep" || 'Table'[Month] = "Oct" || 'Table'[Month] = "Nov"))

Dec = CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Month] = "Dec" || 'Table'[Month] = "Oct" || 'Table'[Month] = "Nov"))

 

Select "Fields" in Modeling tab:

vyadongfmsft_1-1668394399277.png

Add two measure just created.

vyadongfmsft_2-1668394482505.png

You will get a parameter table like this:

vyadongfmsft_3-1668394541917.png

 

Create a slicer using parameter just created and create a matrix as below shown:

vyadongfmsft_4-1668394667164.png

 

Then you can Dynamic Matrix Column Month Header:

vyadongfmsft_5-1668394765423.png

vyadongfmsft_6-1668394788782.png

Best regards,

Yadong Fang

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

djurecicK2
Super User
Super User

@PBE Thanks for the Kudos! Can you please accept as solution if this has solved the issue?

djurecicK2
Super User
Super User

In a Matrix, put Month Name in Columns, then add a date slicer and limit to the last 3 months. 

djurecicK2_0-1667943979111.png

 

Mikelytics
Resident Rockstar
Resident Rockstar

Hi @PBE ,

 

Can you please show your data model as well as the measure you use so far, please?

 

Best regards

Michael

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

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.