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: 
Mahamed_Qlik
Specialist
Specialist

Set analysis

Hi Guys,

 

I have below expression :


if( weekday(TRANS_DATE) ='Fri' or weekday(TRANS_DATE)='Sat' ,interval(ACTION_DATE- WeekStart(ACTION_DATE) , 'hh'),
interval((NetWorkDays(TRANS_DATE+1,ACTION_DATE+1)-1 ) +
(frac(timestamp(ACTION_DATE)) - frac(timestamp(TRANS_DATE))),'hh'))

but I want to use my calender date for user selection, I have two filters as " Cal_Year" &"Cal_Month"

On selection of these two filter above expression needs to be executed so I want to fit these two field to write set analysis in above expression to run it successfully.

 

I tries as -

 

if( { <Cal_Year={'$(vVarYear)'},Cal_Month={'$(vVarMonth)'}>}weekday(TRANS_DATE) ='Fri' or weekday(TRANS_DATE)='Sat' ,interval(ACTION_DATE- WeekStart(ACTION_DATE) , 'hh'),
interval((NetWorkDays(TRANS_DATE+1,ACTION_DATE+1)-1 ) +
(frac(timestamp(ACTION_DATE)) - frac(timestamp(TRANS_DATE))),'hh'))

Note: vVar_Year = Year(TRANS_DATE)& vVarMonth= Month(TRANS_DATE)

 

 

Labels (1)
0 Replies