Showing posts with label Set Analysis. Show all posts
Showing posts with label Set Analysis. Show all posts

Tuesday, August 23, 2016

Creating Qlik Variables with Set Analysis in Script

SET vUnderYear ="=max(undyr)";// 2013
SET vRepStartYTDDate ="=Num(Floor(min({<undyr={'$(vUnderYear)'},Quarter=>}%Date_Date_Key)))";// 41275
SET vRepStartDate ="= Num(Floor(MonthStart(min({<undyr={'$(vUnderYear)'}>}%Date_Date_Key))))";// 41275
SET vRepEndDate ="=Num(Floor(MonthEnd(max({<undyr={'$(vUnderYear)'}>}%Date_Date_Key))))";// 41364
SET vPeriodSelected ="=GetSelectedCount(Year)+GetSelectedCount(Quarter)+GetSelectedCount(Month)+GetSelectedCount(undyr)+GetSelectedCount(CalendarYear)+GetSelectedCount(CalendarQuarter)+GetSelectedCount(CalendarMonthName)";// 2
SET vErrorMessage = 'Please select UWYR and Transaction Period' ;// Please select UWYR and Transaction Period