Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am running a chart that shows me some time values but I want to exclude items that have not had enough time to be comparable. To do this I fetch a value from the filter in order to limit the dates in the data. Only I want to have multiple expressions for the same variable, how can I do this?
This is what my set expression looks like:
count( {<[date]={"<=$(=date(($(varMaxDate)-v_Max_week_number*7),'DD/MM/YYYY'))"}>} ID)
but I would like to have three expressions for the date variable, potentially using rangemin like this:
=date(=rangemin(=date(($(varMaxDate)-v_Max_week_number*7),'DD/MM/YYYY')),=date(($(varMaxDate)-v_Max_day_number),'DD/MM/YYYY')),=date(($(varMaxDate)-v_Max_sale_number*30.42),'DD/MM/YYYY'))))
This however does not work, how can I formulate this expression to make it work?
Try using one more variable, like
vExpression = If(Condition1=TRUE,'=date(=rangemin(=date(($(varMaxDate)-v_Max_week_number*7),'DD/MM/YYYY'))',
If(Condition2=TRUE, '=date(($(varMaxDate)-v_Max_day_number),'DD/MM/YYYY')),'
If(Condition3=TRUE, '=date(($(varMaxDate)-v_Max_sale_number*30.42),'DD/MM/YYYY'))))', 'Null()'
)))
Use this variable in your expression
count( {<date={"$(vExpression)"}>} ID)
While creating the chart the expression might show an error but, would still work.
Try using one more variable, like
vExpression = If(Condition1=TRUE,'=date(=rangemin(=date(($(varMaxDate)-v_Max_week_number*7),'DD/MM/YYYY'))',
If(Condition2=TRUE, '=date(($(varMaxDate)-v_Max_day_number),'DD/MM/YYYY')),'
If(Condition3=TRUE, '=date(($(varMaxDate)-v_Max_sale_number*30.42),'DD/MM/YYYY'))))', 'Null()'
)))
Use this variable in your expression
count( {<date={"$(vExpression)"}>} ID)
While creating the chart the expression might show an error but, would still work.
This is a fantastic idea! However I think I will do it using rangemax of the v_max variables times by their day number in a new variable, I will let you know how it goes!