Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ridleyyeh
Contributor II
Contributor II

If Function

Here's a part of imformation of hospital down below


i wanna set a new column that make sure every sheets is valid


If that data is valid, i'll set that as'1' ,if not, it will be'0'


and the condition to define its valid is to make sure every sheet have to be in the same'MM-DD' and can't be null


i know its must be something to do with "if functions",but i dont know how to make multiple if functions


im new to qliksense ,im appreciated for anyone who can answer my question !

 

 

 

testtest

1 Solution

Accepted Solutions
Channa
Specialist III
Specialist III

second and third column you want to add ,1 if date is mission

or you want to add new column based on 4 columns

if you look for one column just remove and

IF (is missing(date1) and is Missing(date2) and is missing(date3) and is missing(date4),1,0)

or

IF (isNull(date1) and isNull(date2) and isnull(date3) and isnull(date4),1,0)

or

 

IF (Len(date1)<1 and len(date2)<1 and len(date3)<1 and len(date4)<1,1,0)

Channa

View solution in original post

5 Replies
Channa
Specialist III
Specialist III

second and third column you want to add ,1 if date is mission

or you want to add new column based on 4 columns

if you look for one column just remove and

IF (is missing(date1) and is Missing(date2) and is missing(date3) and is missing(date4),1,0)

or

IF (isNull(date1) and isNull(date2) and isnull(date3) and isnull(date4),1,0)

or

 

IF (Len(date1)<1 and len(date2)<1 and len(date3)<1 and len(date4)<1,1,0)

Channa
jonathandienst
Partner - Champion III
Partner - Champion III

Like this perhaps:

If(MonthName(RangeMin(RegisterDate, CallTime, VerifyTime, CompleteDate)) = 
	MonthName(RangeMax(RegisterDate, CallTime, VerifyTime, CompleteDate))
	And Not(IsNull(RegisterDate + CallTime + VerifyTime + CompleteDate))
,1 ,0)
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
ridleyyeh
Contributor II
Contributor II
Author

Thanks for you guy's reply , i have another question.

those data came from my sql database  . As you can see ,you can see 'CompleteDate' this column.

But the weird part is some fields in 'CompleteDate' aint logic, Such as '2019-01-05 00.00', '2019-01-04 00.00' .

'00.00' isnt the work hours for hospital . There must be some kinda error in my db but anyway i was thinking that if 

there's any way that i can delete those weird data by using some function once for all ?

 

if you have any idea, please let me know , thx!

Channa
Specialist III
Specialist III

u want to remove time stamp or you want to filter if time is 00:00

Channa
ridleyyeh
Contributor II
Contributor II
Author

I wanna filter if time is 00:00