Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I'm still a newbie so forgive me for my ignorance.
I used to have a expression for my gauge chart that would calculate the performance of shipments ontime:
gauge expression:
Count({<Status={OnTime}>} Destination) / Count ( {<Status= >} Destination)
Since my data got a bit complex I had to remove the field "Status". Instead I would use an calculated dimension to see how many shipments are ontime or late.
This would be my chart expression.
=if(NetWorkDays(DEP,POD)<='LimitDays', 'OnTime', 'Late')
This works fine on a bar chart as it shows me ontime and late shipments.
I now want to messure the preformance, so I was wondering how can I translate the above gauge expression, without having a the status field?
The expression should be something like this
Count(Distinct Shipmentnumber that are ontime and divide them by all the shipments (ontime and late)
Dont know how to translate that to qlikview language :S
Thanks in advance
iSam
This should work:
This will give you on time
sum(if(NetWorkDays(DEP,POD)<='LimitDays', 1, 0))
This will give you Late
sum(if(NetWorkDays(DEP,POD)<='LimitDays', 0, 1))
I think this would work for the percent:
sum(if(NetWorkDays(DEP,POD)<='LimitDays', 1, 0)) / sum(if(NetWorkDays(DEP,POD)<='LimitDays', 1, 1))
Hi,
Thanks for your help! the expression you made, gives me a constant result of 100%. I've copied the expression to a bar chart, unfortunatelly it gives me the same results.
Do you have any other ideas?
Thanks in advance!
iSam
try this:
sum(if(NetWorkDays(DEP,POD)<='LimitDays', 1, 0)) /Count (Destination)
if that does not work can you post a sample?
Hi,
Unfortunately that didn’t work. Attached is a sample.
Hope u can help me.
Thanks in advance!
iSam
Ps: Basically I want qlikview to count (distinct) the STT unique shipping number that are ontime and divide them by all the shipments that are late and ontime. I just don't know how.
Cheers!
How do you determen if the shipment is on time? Which fields must I use for that?
Hi Dennis,
You can use the field LimitDays. E.g. I created a bar chart with 2 dimension: month and a calculated dimension ‘ if(networkdays(DEP,POD)<=’LimitDays’, ‘OnTime’, ‘Late’) ‘ then I created the expression count (Distinct STT). Based on that I get the all the shipments that are ontime and late.
I just don’t know how to translate it to a gauge chart since I’m not allowed to add dimesion in a gauge chart.
Does this info help?
Regards,
iSam
The field LimitDays is empty in (almost) all rows, in the QV-file you uploaded ...
I see. I think you have to change this in your load script:
Route:
LOAD * INLINE [
Route, LimitDays
JFK | AMS, 7
YMQ | AMS, 7
];
to
Route:
LOAD * INLINE [
Route, LimitDays
JFK|AMS, 7
YMQ|AMS, 7
];
And share it again please.