Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am having following if condition which needs to be converted into Set analysis
Count((if([DB DATE]>=$(Start_date) And (DB_DATE)<=$(End_date),[Instrument No])))
-Jay
Count({<[DB DATE]={'>=$(Start_date) <=$(End_date)'}>} [Instrument No])
Hi,
Try,
Count({<[DB DATE]={">=$(Start_date)<=$(End_date)"}>}[Instrument No])
In addition to the below comments, I would also make sure that $(Start_date) and $(End_date) has same format as DB DATE for this to work. You can check this by adding ='>=' & $(Start_date) & '<=' & $(End_date) to a text box object to check if you get the date range you want in the same format as DB Date.
If you add the set expression column with a blank label, you can see the evaluated set expression in the column label without needing to create an extra text box.
Agreed Colin, but I usually use the text box approach because next step for me is to just copy the the whole text box expression and put it between dollar sign expansion -> $(=TextBoxExpression).
In this case -> Count({<[DB DATE]={"$(='>=' & $(Start_date) & '<=' & $(End_date))"}>}[Instrument No])
You may not like my approach, but this gives the exact same result and make me feel like I am in control of what is going on
Best,
Sunny