- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Creating a measure based on set time periods.
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!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try
Count(If( [Rct_Date]-[Del_Date]<=0,1)) / Count( Total Rct_Date])
Does this work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try
Count(If( [Rct_Date]-[Del_Date]<=0,1)) / Count( Total Rct_Date])
Does this work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And how do you calculate these time periods or in what fields are these time periods based upon?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- 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 needed calc:
count of items classified as On Time/count of total population during reporting period)*100
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the direction!!