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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Dynamic Titles for Month over Month, Quarter over Quarter, Year over Year

Hi,

 

I am a new user to powerbi and I have been tasked to do a sales report. The report consists of time series comparisions such as month over month , quarter over quarter and year over year. My issue currently is that I have no clue how to make a dynamic title that changes based on the filter selection by the user. (the user is using the filter pane). 

 

For example,

 

If the user chooses a year and only a year as a filter, the title should show YOY (or Year over year ). If he or she selects a quarter in addition to the year the title should show QOQ (or quarter over quarter). This applies for month selection as well. 

 

I have had a look at the 'SWITCH' dax function, but I do not have any sustainable values to attribute to the expression. Just to sign post : SWITCH (expression,value1, result 1...[else]). I am really lost on how to resolve this problem as the user currently will have no idea if what they selected in the filters are yoy, qoq, or mom comparisions without a title. 

 

Thank you for your help!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

Thank you so much for the reply it has taught me how to use the switch function in this situation. However, this dax formula works only when quarter or month is selected independantly from year. 

 

For example, when I click on a month option in the filter pane after filtering year to 2019, the card still shows "YOY" when it should show "MOM". But when I click the month option only in the filter pane without specifying the year, it changes to "MOM" , my data is no longer useful. Because if I selected "January" without specifying which year, the data gives me the sum of "Jan 2019+ Jan 2018 +Jan 2017" as a result when what I need is "Jan 2019" only. 

 

Thank you so much for your help once again!

 

Cheers,

Alex

View solution in original post

2 REPLIES 2
dax
Community Support
Community Support

Hi AlexOudea, 

It seems that you will use page filter to choose  Year or Month, right? If so, you could use a  card  as title and use below measure

Measure = switch(TRUE(),ISFILTERED('Table 2'[year]), "YOY", ISFILTERED('Table 2'[month]), "MOM")

496.PNG

Best Regards,
Zoe Zhi

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

 

Anonymous
Not applicable

Hi,

 

Thank you so much for the reply it has taught me how to use the switch function in this situation. However, this dax formula works only when quarter or month is selected independantly from year. 

 

For example, when I click on a month option in the filter pane after filtering year to 2019, the card still shows "YOY" when it should show "MOM". But when I click the month option only in the filter pane without specifying the year, it changes to "MOM" , my data is no longer useful. Because if I selected "January" without specifying which year, the data gives me the sum of "Jan 2019+ Jan 2018 +Jan 2017" as a result when what I need is "Jan 2019" only. 

 

Thank you so much for your help once again!

 

Cheers,

Alex

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.