cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic filter with input parameter

TwieN
8 - Cloud Apps
8 - Cloud Apps

I have this parameter from QbeeQ plugin called [@Days_Ago]. It should be used as a filter in formulas

For example: Calculate total sales with [Days Ago] < =  [@Days_Ago]
The formula would look like ([Total Sales] , [Days Ago]) while [Days Ago] column should filtered by [@Days_Ago] instead of a fixed value:

TwieN_0-1657807825331.png

Please let me know how to achieve this. Much appreciated!

1 ACCEPTED SOLUTION

Konrad
8 - Cloud Apps
8 - Cloud Apps

Hi @TwieN ,

It is not possible to add parameter variable into Sisense filter directly. However with our plugin you can achieve desired functionality in different way.

It depends from your naming convention and data structure, but the logic of formula would look like below:

sum([OrderID], case when [Min Days Ago] <= @Days Ago then [Total Sales] else 0 end)

Order ID would be unique key here for each single transaction. Next in "case" statement it can be Min,Max,Avg, etc. from Days Ago, it doesn't really matter it will just return numerical output for the comparison with parameter variable.

Let us know if you still have any questions. We'd also like to encourage you to reach out to us directly if you'll have any questions or issues related to our plugins.

--
Konrad Wróblewski
QBeeQ 

View solution in original post

1 REPLY 1

Konrad
8 - Cloud Apps
8 - Cloud Apps

Hi @TwieN ,

It is not possible to add parameter variable into Sisense filter directly. However with our plugin you can achieve desired functionality in different way.

It depends from your naming convention and data structure, but the logic of formula would look like below:

sum([OrderID], case when [Min Days Ago] <= @Days Ago then [Total Sales] else 0 end)

Order ID would be unique key here for each single transaction. Next in "case" statement it can be Min,Max,Avg, etc. from Days Ago, it doesn't really matter it will just return numerical output for the comparison with parameter variable.

Let us know if you still have any questions. We'd also like to encourage you to reach out to us directly if you'll have any questions or issues related to our plugins.

--
Konrad Wróblewski
QBeeQ