Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create a measure for 3 gauge chart showing me % on time deliveries. A gauge chart for each time period of 1,4,13 weeks).
Here is my calc:
count of items classified as On Time/count of total population during reporting period)*100
My thought process was the following: (which is giving me an error). !
sum(Count([Rct_Date]-[Del_Date]<=0)) / (sum(total(Count(Rct_date))))
Then qualify by the time period I need and use each measure based on it's time period in the appropriate gauge chart.
Any help would be greatly appreciated!
Try
Count(If( [Rct_Date]-[Del_Date]<=0,1)) / Count( Total Rct_Date])
Does this work?
Try
Count(If( [Rct_Date]-[Del_Date]<=0,1)) / Count( Total Rct_Date])
Does this work?
Thank you! That does help with the first part of my question. Now I just need to find out how limit to the correct time periods!
And how do you calculate these time periods or in what fields are these time periods based upon?
So, here's my next thought (for gauge #1 - 13 weeks)...I'm versed in sql, so my thoughts go to dateadd. I could be totally off here as to a formula in Qlik....:
If(Rct_date>=(today()-13Week),
Count(If( [Rct_Date]-[ERF_END_Date]<=0,1)) / Count( Total Rct_Date])*100
,1)
I know the expression is not quite right, as I have an error, but can anyone direct me?
Again, what I am trying to accomplish is?
Here is my needed calc:
count of items classified as On Time/count of total population during reporting period)*100
In general, use aggregation functions in expressions:
Try
Count(If( [Rct_Date]-[ERF_END_Date]<=0 and [Rct_Date]>=Today()-13*7 ,1)) / Count( Total If([Rct_Date]>=Today()-13*7,Rct_Date]))*100
Thanks for the direction!!