March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
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!
Solved! Go to Solution.
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
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")
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.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
132 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |