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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating Maximum Wait Time as HH:MM

Am trying to use a concatenate script to report on the Maximum of 'TotalWait' which is calculated field within EDDATA based on  calculation DateDiff(MINUTE,att.ARRIV_DTTM,att.DEPRT_DTTM) [TotalWait]

The following runs without error when I refresh data load, but when using Chart object to create a Pivot table the below value does not appear?? Is it to do with calculation or the data type format?

concatenate (SummaryED)

load

    Campus as Campus,

    Year as Year,

  Qtr as Qtr,

  Month as Month,

  WeekEnding as Week,

  Date as Date,

  DOW as DOW,

  num ((Max ([TotalWait]))/60, '#,##0')&':'&Mod(Max([TotalWait]),60) as SummVal,

  'Max Total Wait' as SummType

resident EDDATA

group by Campus, Year, Qtr, Month, WeekEnding, Date, DOW

1 Reply
Anonymous
Not applicable
Author

Hi Claire,

Try this:

concatenate (SummaryED)

load

  Campus as Campus,

  Year as Year,

  Qtr as Qtr,

  Month as Month,

  WeekEnding as Week,

  Date as Date,

  DOW as DOW,

  Interval(Max([TotalWait]),'hh:mm')     as SummVal,

  'Max Total Wait' as SummType

resident EDDATA

group by Campus, Year, Qtr, Month, WeekEnding, Date, DOW

Regards!