Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
gaznez
Advocate I
Advocate I

choose 2 months from slicer & have the column headers in matrix visual change to chosen months

I have a matrix visual showing costs for 2 specific months that are selected from a slicer.  The measures used to do this are called Month1 and Month2.  Is there a way I can get the column headers to change to the 2 specific months selected?

 

Matrix visual & slicer:

gaznez_0-1712915960709.png

So in the above Scenario - I would want Month1 to show as Mar24 and Month2 to show as Jan24

The DAX for Month1 = 

Month1 =
VAR MaxDate = MAX(Dates[MonthYear])
RETURN
CALCULATE([Cost],Dates[MonthYear] = MaxDate)
The DAX for Month 2 is the sam but uses MIN instead of MAX.
Any help would be greatly appreciated!
Thanks!

 

1 ACCEPTED SOLUTION
gaznez
Advocate I
Advocate I

Hi all,

I eventually found my own workaround.  I moved the Month1 and Month2 measures to 'Columns' in the matrix - rather than values (see image below)...

gaznez_0-1713169437176.png

This then meant that I had 'Cost' , 'Diff' and '%' showing under each of the 2 months.  I then had to hide the 'Diff' and '%' columns for every month that could be chosen in the slicer - since it is only the Total Diff & % that makes any sense.  Final result works...

gaznez_1-1713169758066.png

Thanks @Ritaf1983 for the suggestions, although I was unable to replicate any of those workarounds to my model.

View solution in original post

2 REPLIES 2
gaznez
Advocate I
Advocate I

Hi all,

I eventually found my own workaround.  I moved the Month1 and Month2 measures to 'Columns' in the matrix - rather than values (see image below)...

gaznez_0-1713169437176.png

This then meant that I had 'Cost' , 'Diff' and '%' showing under each of the 2 months.  I then had to hide the 'Diff' and '%' columns for every month that could be chosen in the slicer - since it is only the Total Diff & % that makes any sense.  Final result works...

gaznez_1-1713169758066.png

Thanks @Ritaf1983 for the suggestions, although I was unable to replicate any of those workarounds to my model.

Ritaf1983
Super User
Super User

Hi @gaznez 
We don't have this option as a core formatting.
But there are some workarounds to achieve it .
Please refer to the linked videos:

https://www.youtube.com/watch?v=zbKNyFu2BOo

https://www.youtube.com/watch?v=IM4DaT6oF6k

https://www.youtube.com/watch?v=4emPkBiiCtg

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

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.