Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hiya
I wish to on a chart, on after a certain date, count different conditions
I have the following expression
e.g
if(OrderDate < '01/01/2015', count({$< DeliveryType = {"1"}CustomerID)) or
if(OrderDate > '01/01/2015', count({$< DeliveryType = {"2"}, CustomerID))
I am having no joy
please advise / help
May be this:
Count({<OrderDate = {"$(='<' & MakeDate(2015, 1, 1))"}, DeliveryType = {1}> + <OrderDate = {"$(='>' & MakeDate(2015, 1, 1))"}, DeliveryType = {2}>}CustomerID)
Count({<OrderDate = {"$(='<' & Date(MakeDate(2015, 1, 1), 'YourDateFieldFormat'))"}, DeliveryType = {1}> + <OrderDate = {"$(='>' & MakeDate(2015, 1, 1), 'YourDateFieldFormat'))"}, DeliveryType = {2}>}CustomerID)
Note:
You have < (less than) and > (greater than), but not equal. I would expect data for OrderDate = 1/1/2015 so add = sign to one of the two expressions.
Hi Joanna, the syntax for set analisys is incomplete:
if(OrderDate < '01/01/2015', count({$< DeliveryType = {"1"}>} CustomerID)) or
if(OrderDate > '01/01/2015', count({$< DeliveryType = {"2"}>} CustomerID))
It can work depending of your dimension, if it's OrderDate it can work, if it's some field wich can have many OrderDate (like months o weeks) you'll need to add an aggregation funtion to OrderDate to pick only one of those values:
If(Max(OrderDate) ....
Hiya
Sunny ...your version works best but only if I select a OrderDate from the filter pane,
please advise / help
Would you be able to share a sample?