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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
marikabi
Creator
Creator

trigger to select full week

Hello All,

I'm loading to my Qlik View application data aggregated on a daily basis.

Based on the date i define in the loading script the WEEK_YEAR dimension

as week(Floor(DATE))&'-'&YEAR(DATE) as WEEK_YEAR   (example 14-20 )

i'm trying to set a trigger  to select only weeks made of 7 days (full weeks) when activating a sheet.

Please any idea how to set this?

 

thank you very much

 

Labels (2)
1 Solution

Accepted Solutions
rubenmarin
MVP
MVP

Hi, I think you can add a flag field in script to check those full weeks, something like:

If(DATE<WeekStart(Today()), 1, 0) as isFullWeek

And use this flag to filter data selcting in trigger:

='("'&concat(distinct {<isFullWeek={1}>} WEEK_YEAR,'"|"')&'")'

View solution in original post

2 Replies
rubenmarin
MVP
MVP

Hi, I think you can add a flag field in script to check those full weeks, something like:

If(DATE<WeekStart(Today()), 1, 0) as isFullWeek

And use this flag to filter data selcting in trigger:

='("'&concat(distinct {<isFullWeek={1}>} WEEK_YEAR,'"|"')&'")'

marikabi
Creator
Creator
Author

hello,

this is great !

I partially used your solution, without creating any flag i just triggered the selection of dates as

= '<' & WeekStart(Today())

and it works as expected!

 

have a nice weekend!