Dynamic change of graphs according to selected date range

Hello there,

I have 2 visuals showing YTD & MTD. In my YTD, I have all the months data let’s say from Jan 2022 till Oct 2022. In my MTD the graph shows the current month data, eg: Oct1, Oct 2…till current date(Oct 9). I have controls/filters to select date range so when I select Sep 1st to Sep 15th, my YTD graph filters the data and displays according to the selected date range, however my MTD graph still shows Oct data. Is there a solution to dynamically change my MTD visual?
Appreciate the help
Thank you

Hi @likhitha , curious how did you generate your YTD and MTD column, are you using the period to date function suite? If you are using the aggregation period function such as periodToDateSum(), pay attention to the last argument, if it is left blank, then it is default to now(). You can also link with your parameter control as the todate argument to make it dynamically change with your user input, e.g. periodToDateSum(Sales,{Order Date},MONTH, ${EnddateParameter})


This may help you.

Naveed Ali

1 Like

Hi Emily,
I dragged and added ‘DATE’ to my visual. I haven’t used any functions.
I have date range control added to top.
I have overview table visual with all dates & calculations.
Then I have my 2nd visual YTD, Just dragged DATE field here, I have all the months data let’s say from Jan 2022 till Oct 2022 ( This I call as YTD)
Then I have my 3rd visual MTD, just dragged DATE filed here, eg: Oct1, Oct 2…till current date(Oct 9).
If I select a certain date in my overview table, all the visuals should change.
If I select certain date range in my control, all the visuals should change. However, the MTD I’m displaying in the visual by default displays the latest month (in my case its Oct month currently)
But if I apply date range in controls, this MTD should change accordingly.


Hi Naveed,
Thanks for the link. My use case is different as described below, I appreciate the help if you have a solution to it.

How are you getting YTD and MTD calculations?

Can you share screen shots of your visuals?

And what are the filters that you’ve applied to these visuals?