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: 
Not applicable

Expression with set analysis

Hi,

how do I write this expression with set analysis?

count(if(right([OP - start],5)>'07:14' and right([OP - start],5)<='08:35' and (Group='COP') and Ydate=year(today()) and (Mdate=month(today())-1),1))

Best regards
Krister



1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Krister and welcome to the forums,

Although you may be interested in using timestamp() or date() functions to extract time and date from your timestamp fields, your request should be something like

Count({< [OP - start] = {"=Right([OP - start], 5) > '07:14'", "=Right([OP - start], 5) <= '08:35'"}, Group = {'COP'}, Ydate = {'$(=Year(Today()))'}, Mdate = {'$(=Month(Today()) -1)'} >} 1)


This is untested, so please check that parentheses and brackets are properly closed.

Regards.

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hello Krister and welcome to the forums,

Although you may be interested in using timestamp() or date() functions to extract time and date from your timestamp fields, your request should be something like

Count({< [OP - start] = {"=Right([OP - start], 5) > '07:14'", "=Right([OP - start], 5) <= '08:35'"}, Group = {'COP'}, Ydate = {'$(=Year(Today()))'}, Mdate = {'$(=Month(Today()) -1)'} >} 1)


This is untested, so please check that parentheses and brackets are properly closed.

Regards.

Not applicable
Author

Thanks for your qick respons, I got it to work using your expression.

Best regards
Krister