Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community, im trying to resolve the following expression.
I have this table
product | op | time_start | time_end |
---|---|---|---|
A | 122 | 8:30 | 17:30 |
B | 123 | 9:00 | 11:00 |
C | 124 | 11:20 | 13:50 |
D | 125 | 13:40 | 14:10 |
what i need is the PROM value (in hours) between all time_end and time_start, columns, in this case:
A --> 9 hours
B --> 2 hours
C --> 2,5 hours
D --> 0,5 hours
PROM: 3,5 hours
thanks
gerardo
sorry...i can not open the file...i have a personal edition versión...
After load of your table then in straight table
Dimension :- Product
Expression :- Time((time_end-time_start),'hh:mm' )
it will show
Dimension :- Product
Dimension :- op
Expression :- Time((time_end-time_start),'hh:mm' )
and it will show
I believe it will show correct values let me know.
i forgot. but i hope than you like qv more and more and at the end you will have license
Now:
script:
the same as earlier
dimension: product or nothing or as you want
expression:
Time(avg(aggr( sum(time_end-time_start),product)))
Hope it helps.
regards
Darek
Sure! Thanks!
De: Dariusz Mielczarek
Enviado el: miércoles, 16 de abril de 2014 03:27 p.m.
Para: Pauza, Gerardo
Asunto: Re: - Re: expression definition with dates
Qlik Community<http://community.qlik.com/>
Re: expression definition with dates
reply from Dariusz Mielczarek<http://community.qlik.com/people/darek.mielczarek?et=watches.email.thread> in App Development - View the full discussion<http://community.qlik.com/message/510589?et=watches.email.thread#510589>
Remember to let me know if it was helpful and if it solves your problem
regards
Darek
Sorry but not…let me send you the .qvw file
In this example I need the average value -4,45 (you can see it in the straight table) in the average box.
Many thanks
gerardo
De: Dariusz Mielczarek
Enviado el: miércoles, 16 de abril de 2014 03:47 p.m.
Para: Pauza, Gerardo
Asunto: Re: - expression definition with dates
Qlik Community<http://community.qlik.com/>
expression definition with dates
reply from Dariusz Mielczarek<http://community.qlik.com/people/darek.mielczarek?et=watches.email.thread> in App Development - View the full discussion<http://community.qlik.com/message/510627?et=watches.email.thread#510627>
But you asked about time in your first post. I can see, that you have dates in your application.
This expression:
avg(aggr( sum(AR_OF_LUXEVENT_AD.USR_PDRMVH_FCHMOV-AR_OF_LUXEVENT_AD.USR_PDRMVH_FCHENT),%Key_NUMERO_OF_AR))
gives result as yours, i think (and hope )
Is not working….qlikview cannot resolve the expression….
De: Dariusz Mielczarek
Enviado el: miércoles, 16 de abril de 2014 04:49 p.m.
Para: Pauza, Gerardo
Asunto: Re: - expression definition with dates
Qlik Community<http://community.qlik.com/>
expression definition with dates
reply from Dariusz Mielczarek<http://community.qlik.com/people/darek.mielczarek?et=watches.email.thread> in App Development - View the full discussion<http://community.qlik.com/message/510640?et=watches.email.thread#510640>
I copied this expression stright from your qvd exaple. Try again to use this expression in example you shared (Tablero formulas .....)
avg(aggr( sum(AR_OF_LUXEVENT_AD.USR_PDRMVH_FCHMOV-AR_OF_LUXEVENT_AD.USR_PDRMVH_FCHENT),%Key_NUMERO_OF_AR))