The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
141 | |
109 | |
107 | |
76 | |
61 |
User | Count |
---|---|
276 | |
129 | |
124 | |
100 | |
89 |