Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Mapping two dates in set analysis

Hi All,

I have a requirement to map dates in UI scripting ,How to add Rating year in below set analysis

when 201703 and onwards  month_year selected rating year should be 2016  else it should be 2015:

Count({<[Month_Year] = {'$(vMaxMonthYear)'}>} [Employee Count])

   

Month_YearRating Year
2016032015
2016042015
2016052015
2016062015
2016072015
2016082015
2016092015
2016102015
2016112015
2016122015
2017012015
2017022015
2017032016
2017042016

Any help is appreciated.

Thanks & Regards

Neetha

1 Solution

Accepted Solutions
sunny_talwar

Why the curly brackets? May be this

=Count({<[Worker Status]= {'$(vWorkerstatus_Inactive)'}, [Termination Count] = {1}, [Month_Year] = {'$(vMaxMonthYear)'},[Rating Year]  = {$(=If(Max(Month_Year) >='$(vMaxMonthYear)' , Max(RYear), Max(RYear)-1))}>} [Employee Count])

View solution in original post

3 Replies
sunny_talwar

May be this

Count({<[Month_Year] = {'$(vMaxMonthYear)'}, [Rating Year] = {$(=If(Max(Month_Year) >= 201703, '2016', '2015'))}>} [Employee Count])

Anonymous
Not applicable
Author

Hi Sunny,

Thanks for quick response, quiet modified your syntax:

=If(Max(Month_Year) >='$(vMaxMonthYear)' , Max(RYear), Max(RYear)-1)  - This works

=Count({<[Worker Status]= {'$(vWorkerstatus_Inactive)'}, [Termination Count] = {1}, [Month_Year] = {'$(vMaxMonthYear)'},[Rating Year]  = {$(=If(Max(Month_Year) >= {'$(vMaxMonthYear)'}, Max([Rating Year] ), Max([Rating Year] )-1))}>} [Employee Count])  - but this  doesn't work.

Thanks

Neetha


sunny_talwar

Why the curly brackets? May be this

=Count({<[Worker Status]= {'$(vWorkerstatus_Inactive)'}, [Termination Count] = {1}, [Month_Year] = {'$(vMaxMonthYear)'},[Rating Year]  = {$(=If(Max(Month_Year) >='$(vMaxMonthYear)' , Max(RYear), Max(RYear)-1))}>} [Employee Count])