Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

timestamp set analysis expression for sum of sales

Hi,

I need to calculate sum of sales for the last 2 hrs sales and yesterday same 2 hrs sales.

example: if the today sales between 9:00 am - 11:am is 100, then yesterday same 9:00 am - 11: am 90

the set analysis expressions I am using are

Today last 2 hrs: Sum( $<timestamp={">=$(=max(timestamp))-2/24"}> Sales)

same 2 hrs yesterday: should be between 26/24 - 24/24....

Sum( $<timestamp={">=$(=max(timestamp))-26/24"}> Sales)

Sum( $<timestamp={"<=$(=max(timestamp))-24/24"}> Sales)

how do i use the above expressions in a single expression? or any other alternative?

Thanks in Advance

1 Solution

Accepted Solutions
pover
Luminary Alumni
Luminary Alumni

Are you looking for something like this?

Sum( $<timestamp={">=$(=max(timestamp))-26/24<=$(=max(timestamp))-24/24"}> Sales)

Regards.

View solution in original post

2 Replies
pover
Luminary Alumni
Luminary Alumni

Are you looking for something like this?

Sum( $<timestamp={">=$(=max(timestamp))-26/24<=$(=max(timestamp))-24/24"}> Sales)

Regards.

Not applicable
Author

Yes... Thank You.....