Filter data based on multiple Parameter value selection

Hi Team,
I have a parameter (type list) name reporting_granularity which has values → Daily, Weekly, Monthly. Additionally, I have a calculated field total which is a calculated field, below is the formula,

ifelse( in('Daily', ${reporting_granularity}, part1, in('Weekly', ${reporting_granularity}, part2, in('Monthly', ${reporting_granularity}, part3, 0 )

I want user to be able to select all three parameter values and total to show aggregation of all 3 → part1 + part2 + part3. But based on the currently formula I am only being able to do it for only one value.

One way I discover to solve it is use and statements, but I don’t find it efficient and it is highly prone to errors. Is there any alternative way?

Hello @karanchhabra99 - Thank you for posting your query. I have tried to simulate the scenario at my end and I believe I was able to work it out provide my understanding is correct. Can you please go through the below steps and let me know if this is what you are looking for? Hope this helps!

Step 1 : Sharing the Sample Dataset Details below which I have considered to work out the scenario.


Step 2 : Create a Parameter with the following details

Step 3 : Create a Calculated Field


Step 4 : Sample Executions for various parameter selection

Did my suggestion help you in resolving your query? If yes, would request you to mark the post as “Solution”. This will help the community to find guidance and answers to similar question. Thank you!

1 Like