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: 
nareshthavidishetty
Creator III
Creator III

set analysis with if condition

Hi,

I have us the below logic but it's not working.

Please let me know if my logic is correct.

Logic:

=if(date([Qlik Last Refresh Presentation Layer],'DD MMM YYYY') < = date(max({$< =if(GetSelectedCount([Month Abbr])>0 OR GetSelectedCount([Month Year Abbr])>0 OR GetSelectedCount([Month Year])>0 OR GetSelectedCount([Month Nr])>0 OR GetSelectedCount([Month Code])>0 OR GetSelectedCount([Quarter Year Abbr])>0 OR GetSelectedCount([Quarter Name])>0 OR GetSelectedCount([Quarter Year])>0 OR GetSelectedCount([Quarter Code])>0  ,vSA_MonthlySnapshot, if(GetSelectedCount([Week Nr])>0 OR GetSelectedCount([Week Code])>0 ,vSA_WeeklySnapshot,vSA_DailySnapshot)) >} [Calendar Date]),'DD MMM YYYY'),date([Calendar Date],'DD MMM YYYY'),date([Qlik Last Refresh Presentation Layer],'DD MMM YYYY'))

2 Replies
nareshthavidishetty
Creator III
Creator III
Author

Hi,

The actual logic is

==if(date([Qlik Last Refresh Presentation Layer],'DD MMM YYYY') < =date(max({$< $(vS_SnapshotSelect) >} [Calendar Date]),'DD MMM YYYY'),
date(
[Qlik Last Refresh Presentation Layer],'DD MMM YYYY'),date(max({$< $(vS_SnapshotSelect) >} [Calendar Date]),'DD MMM YYYY'))


where vS_SnapshotSelect

=if(GetSelectedCount([Month Abbr])>0 OR GetSelectedCount([Month Year Abbr])>0 OR GetSelectedCount([Month Year])>0 OR GetSelectedCount([Month Nr])>0 OR GetSelectedCount([Month Code])>0 OR GetSelectedCount([Quarter Year Abbr])>0 OR GetSelectedCount([Quarter Name])>0 OR GetSelectedCount([Quarter Year])>0 OR GetSelectedCount([Quarter Code])>0  ,vSA_MonthlySnapshot, if(GetSelectedCount([Week Nr])>0 OR GetSelectedCount([Week Code])>0 ,vSA_WeeklySnapshot,vSA_DailySnapshot))

Thanks..

marcel_olmo
Partner Ambassador
Partner Ambassador

Hi, are you sure this data format suits you?

DD MMM YYYY


I mean that, because it wil return, for example as today 03 OCT 2018. Triple M means month in characters.

A usual format would be DD/MM/YYYY

Regards, Marcel.