Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am calculating the difference between two dates and need to graph on a bar chart only the dates that have a value less than 0 (these are the dates that were not delivered by the need by date)
To calculate the difference, I am doing this:
Sum(Date([Projected Need Date]) - Date([DeliveryDate])
I have set up a bar chart with the dimension [ID] and the measure is Sum(Date([Projected Need Date]) - Date([DeliveryDate]).
This shows me a graph of all of the date differences, both positive, negative, and zero (arrived on the need by date). What I need to show is only the negatives. Any ideas?
Perhaps this?
Sum({<ID={"=Len(Sum(Date([Projected Need Date]) - Date([DeliveryDate]))<=0"}>}Date([Projected Need Date]) - Date([DeliveryDate])
Perhaps this?
Sum({<ID={"=Len(Sum(Date([Projected Need Date]) - Date([DeliveryDate]))<=0"}>}Date([Projected Need Date]) - Date([DeliveryDate])
In my expression for the ID dimension, I have updated the code to this but it says it is invalid, though the expression shows as OK
=if(
Sum(Date([Projected Need Date]) - Date([Delivery Date])) <0
,[ID])
In my head, this would only show the IDs that have a result less than 0 but it is not working.
Aggregated data not allowed in dimension, Instead you can try this
=if(
Aggr(Sum(Date([Projected Need Date]) - Date([Delivery Date])),ID) <0
,[ID])