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

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF statement

Hi,

How is in the set analyse with if statement

if(only select on Year and Month in Calendar, then sum(Value).

Thanks

4 Replies
Not applicable
Author

Why not use IF()? You don't need to define a set, just use a conditional statement.

Not applicable
Author

Hi,

i have 2 variable.

varstartdate

varenddate

how can i in statement the sum(value) from range varstartdate and varenddate become.

(>=varstartdate and <=varenddate sum(value))

Thanks

prieper
Master II
Master II

SUM(IF (YourDate > StartDate AND YourDate < EndDate, Values)=

HTH
Peter

Not applicable
Author

Hi,

Thanks, sorry but it is not what i want.

i want the sum of Valuse in range from StartDate and EndDate, when i select the Calendar Year and select the Calendar Month

i have as Variable :

Startdate:

=Date (num(monthsstart(1,[Calendar.Year-Month] ,-12)))

Enddate:

=Date (num(monthsend(1,[Calendar.Year-Month] ,1)))

and Statement :

sum({<Calendar.Date ={">=$(=(Startdate)) <=$(=(Enddate))"}>} Sales)

but it is comming Sales from selected Year and month, not in the range from Startdate to Enddate.

is the formel not correct?

Thanks