Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
attaporn
Contributor II
Contributor II

How can to sum the value with period time & days?

Hi All,

i would like to calculation of the value with period time & days as below:

1. Sum of KW, within 09:00 - 22:00 (only Monday to Friday)

2. Sum of KW, within 22:00 - 09:00 (Monday to Friday) & 00:00 - 24:00 (Saturday, Sunday & Holiday)

3. Max of average for KW every 15 minute, within 09:00 - 22:00 (only Monday to Friday)   

to show on KPI visualization, Could you please help for expression script.......

 

BTW, the data as attached file: kw.csv in zip
and i think may be need to create new data for Holiday.

Example:
2020/01/01,New year
2020/12/25,Christmas Day

Best regards,

Labels (3)
3 Replies
Vegar
MVP
MVP

One way of solving this is to create an intervalmatch on ofaå numeric field created by [weekday-num] + [time-fraction].

Take a look at the intervalmatch help section.

attaporn
Contributor II
Contributor II
Author

Thank you for your suggestion, but I'm quite new in Qlik sense.

Please advise in advance for the detail and will be great if can have an example.

Vegar
MVP
MVP

See attached qvf.

I've not attempted to calculate no 3, but if you make 15 min intervals then you could do a count per interval-

 

(Im not suggesting that you should use Inline to define you intervals, you will need a way to create them autmaticly in your script)