Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a simple expression which give me a line chart where the only dimenion is CalendarDate
COUNT (DISTINCT UserName)
Can I use a set analysis in this expression to excluded Saturdays and Sundays from the chart? If so, how?!
Yes,
in your script
LOAD
weekday(CalendarDate) as WeekDay
From Table1;
Then, you can use in your expression
COUNT ({<WeekDay-={6,7}>} DISTINCT UserName)
Yes,
in your script
LOAD
weekday(CalendarDate) as WeekDay
From Table1;
Then, you can use in your expression
COUNT ({<WeekDay-={6,7}>} DISTINCT UserName)
Create below line in your script...
IF(WeekDay(CalendarDate)=5 or WeekDay(CalendarDate)=6, 1,0) as WeekDayFlag
Now use as below..
COUNT ({<WeekDayFlag = {'0'}>}DISTINCT UserName)
Thanks Yoann, i adpated that and it worked perfectly!
COUNT({$<CalendarDayName-={'Sat','Sun'}>} DISTINCT UserName)
For your information..
weekday in qlikview starts from Monday as 0 and ends at Sunday as 6....
so no 7...