Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
emyemyemy
Contributor III
Contributor III

Compare 2 excel weeks column in the same table

 I want to count rows  where   week1 column <=  week2 column  

This is what i tried but it shows 0  as a result !

LOAD   id  
from
[table.xlsx]
where 

Date(MakeWeekDate(year(now()),Replace(week1,'S','')),'MM/yyyy') 

 < =

Date( MakeWeekDate(year(now()),Replace(week2,'S','')),'MM/yyyy' ) ;

and

I    write count(id)  in my  Text object expression    :  IT shows me  Zero  while i have 2 rows  matching with my  where condition !

PS:   Date( MakeWeekDate(year(now()),Replace(week2,'S','')),'MM/yyyy' )   : this  expression is correct    

Exemple :  Week1 = S1  = 01/2021

I appreciate   you   help !

Labels (4)
2 Solutions

Accepted Solutions
emyemyemy
Contributor III
Contributor III
Author

I  figured out  the problem  :

My second column (week2 ) name was divided on 3 parts separated  like this [ date plannified installation ]  i hv  concatenated  to be [ DatePlannified installation ] writed  in 2 parts and    it works .

View solution in original post

emyemyemy
Contributor III
Contributor III
Author

 the code i write in my question is correct   if any one need it   🙂 

View solution in original post

2 Replies
emyemyemy
Contributor III
Contributor III
Author

I  figured out  the problem  :

My second column (week2 ) name was divided on 3 parts separated  like this [ date plannified installation ]  i hv  concatenated  to be [ DatePlannified installation ] writed  in 2 parts and    it works .

emyemyemy
Contributor III
Contributor III
Author

 the code i write in my question is correct   if any one need it   🙂