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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ashmitp869
Creator II
Creator II

How to get avg - from date difference (mins)

Hi ,

I have create in sql db to get the diff of two dates in minuutes like below -

select

iif((DATEDIFF(minute,[SUB_EVNT_FIRST_DECISION_FORMALLY_ADMIT_DTTM],[CL_DEPART_DTTM]) >=0 and ([SUB_EVNT_FIRST_DECISION_FORMALLY_ADMIT_DTTM] is not null)),DATEDIFF(minute,[SUB_EVNT_FIRST_DECISION_FORMALLY_ADMIT_DTTM],[CL_DEPART_DTTM]),null) as Admitted_Minutes_From_Bed_Ready_To_Transfer

from table

Now , in qlikview - how to get the avg of that field ?

Am I doing this correct in qlikview expression  by using the Avg() ?

Avg([Admitted_Minutes_From_Bed_Ready_To_Transfer]

 

 

Labels (1)
1 Solution

Accepted Solutions
henrikalmen
Specialist II
Specialist II

1 Reply
henrikalmen
Specialist II
Specialist II

Yes.