Hello community!
I’m trying to create a single control filter that can perform two different actions depending on the visualization.
For example, if I select the month June, I’d like some KPIs to display the monthly view for June, while others should show the Year-to-Date (YTD) value — calculated from the beginning of the year up to the selected month.
Thank you so much for the help!
Hi @miguelantunesp,
This is possible if you make a parameter with a relative date (can have a defined default of first day of the year for example). After making the control for this date, make sure to format it to MM, so that it acts as our month selector.
From there, I would make the filters for the YTD and Monthly visuals. For YTD, I would simply make another parameter to act as the start of the respective year you want to do (i.e. DateStart), and do a date and time range between DateStart and Month. For Monthly, set a relative date filter with range for “This month,” attaching the Month parameter. This should give you something like my example below (I am not able to change the title to display just the month, but it functions as intended):
Hope this helps and please feel free to message again if confused on my explanation!
1 Like
Hi @WLS-Luis
Thanks so much for the help and the quick reply!
I have been trying to reproduce your solution and I am not able to figure it out.
On the first step, how I can define the date to be defined as MM? which I believe its month.
I believe if I understand how this first step is done properly I will be able to understand. Ideally, if you could share a demo of what you did, it would be really helpful!
Thank you so much!
Kind Regards,
Miguel Pereira
Hi @miguelantunesp,
I can totally understand the confusion no worries at all! After making the control for Month, click on the top section where the controls are and click the three dots button to the right corner of Month. Once you are in “Format control”, click on “Control Options” and you can specify format MM as shown below:
Finally, you can make the YTD and Monthly filters for the KPIs like this, which should give you intended results:
Thanks for your patience and hope this helps!
It worked @WLS-Luis . Thank you so much for your support on this issue!
2 Likes