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: 
n1ef5ng1
Creator
Creator

Set analysis with criteria that includes timestamp

Hi everyone, I have a question. I cant do it on dimension so is purely on set analysis expressions.

sum({<Day(Date1)=(Day(Date2))}>} Revenue)

Basically i want to sum the revenue if the DAY for Date 1 and Date 2 are on the same DAY.

i.e

Customer booked a hotel room on nov 11 (Date1) and checking in on the date itelf (nov 11), i would want to count these on the same date check in itself on the revenue.

I cant do in script nor dimension.

How should i do

4 Replies
sushil353
Master II
Master II

hi,

you can use if(Date1=Date2,sum(Revenue),null())

shraddha_g
Partner - Master III
Partner - Master III

try

sum(if(day(Date1) = day(Date2),Revenue)

avinashelite

simple could be to add a flag in the script so that your set analysis becomes simple and improve the performance

if(Date1=Date2,1,0) as Flag

sum({<Flag={1}>}Revenue)

Anonymous
Not applicable

Hi Ben,

Find the attached QVW file, it may help you.

R/Murali