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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Mohamed23
Contributor
Contributor

How to write set analysis beetwen two columns

Hello, 
I have calendar (not linked to other sales table)

Date Start End
1.01.2020 1.01.2020 2.01.2020
2.01.2020 2.01.2020 4.01.2020

 

Date Sales
2.01.2020 100
1.01.2020 50

 

How to write set analysis by using values in column start and end.

Sum({$<Date = {">=$(=Start)<=$(=End)"}>} Sales) 
I can not use 
Sum({$<Date = {">=01.01.2020<=01.01.2020"}>} Sales) 
or min or max based on selection. 
Is this any chance to calculate sum beetwen two columns?

Labels (1)
1 Solution

Accepted Solutions
Benoit_C
Support
Support

Hi @Mohamed23,

Can you try the below ?
Sum({$<Date = {"=Date >= Start and Date <= End"}>} Sales)

This expression will sum the sales for dates that are greater than or equal to the start date and less than or equal to the end date.

Regards,

Benoit

View solution in original post

1 Reply
Benoit_C
Support
Support

Hi @Mohamed23,

Can you try the below ?
Sum({$<Date = {"=Date >= Start and Date <= End"}>} Sales)

This expression will sum the sales for dates that are greater than or equal to the start date and less than or equal to the end date.

Regards,

Benoit