Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression definition with dates

Hi Community, im trying to resolve the following expression.

I have this table

productoptime_starttime_end
A1228:3017:30
B1239:0011:00
C12411:2013:50
D12513:4014: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

18 Replies
Not applicable
Author

sorry...i can not open the file...i have a personal edition versión...

its_anandrjs
Champion III
Champion III

After load of your table then in straight table

Dimension :- Product

Expression :- Time((time_end-time_start),'hh:mm' )

it will show

withprod.png

Dimension :- Product

Dimension :- op

Expression :- Time((time_end-time_start),'hh:mm' )

and it will show

withprod&op.png

I believe it will show correct values let me know.

Not applicable
Author

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

Not applicable
Author

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>

Not applicable
Author

Remember to let me know if it was helpful and if it solves your problem

regards

Darek

Not applicable
Author

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>

Not applicable
Author

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 )

Not applicable
Author

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>

Not applicable
Author

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))