How to change the parameter controls values based on some condition

Hi Team,

I am using conditional rendering rules for my visuals to show and hide them based on user selections. Currently, my visuals display either Hourly or Daily data based on these rules. However, I now want to introduce an additional condition: displaying data for a specific shift, which runs from 7 AM to 7 PM. I have calculated the start and end times for this shift.

Is there a way to dynamically change the start and end date-time values with these two calculated values? Alternatively, can I include these calculated shift times in the filter for the date parameter field?

1 Like

Hello @Harsheena , I think your solution here is going to be similar to the solution I suggested for the other topic you posted in the community.

I would try a similar functionality where you use the Start Date and End Date parameters to set your specific period within the dataset via a calculated field and then implement a similar filter on that calculated field by using rolling date to exclude nulls.

Here is the calculated field I suggest to try and get this to work:

ifelse(
addDateTime(7, 'HH', ${STARTTIME}) <= {Date} AND {Date} <= addDateTime(-5, 'HH', ${ENDTIME}),{Date}, NULL
)

Let me know if this helps! Good luck!

Hi @DylanM , Thank you so much for your support.

This solution worked, Once again, thank you for your expertise and generosity in sharing your knowledge.

1 Like