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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Tanya_Sharma99
Contributor
Contributor

Getting an error in the Set analysis

Hi Experts,

I have written the following expression. My 'Date' should be selected on the basis of a set of conditions :

=sum({<Shift={'Shift A'},Date={
if($(CurrentTime) ={">=$(From1)<=$(To1)"}, $(MaxDateMinus1),
if($(CurrentTime) ={">=$(From2)<=$(To2)"}, $(MaxDate),
if($(CurrentTime) ={">=$(From3)<=$(To3)"} ,$(MaxDate),
if($(CurrentTime) ={">=$(From4)<=$(To4)"},$(MaxDateMinus1),$(MaxDate)))))
}>} Alarm)

 

But I'm getting the following error:

Tanya_Sharma99_0-1628849519923.png

Could anyone please point out what I'm doing wrong ?

2 Replies
Lisa_P
Employee
Employee

I think that the {} brackets should not be there for {">=$(From1)<=$(To1)"} because this is not a definition within the set analysis, but a logical if condition, try plain brackets ()

avinashelite

I think your trying to evaluate  if statement in Date and it doesn't have " " around it try like

Date={"
if($(CurrentTime) ={">=$(From1)<=$(To1)"}"}