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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
pascaldijkshoor
Creator
Creator

Weekday in set analysis

Hello,

I want to include certain weekdays in set analysis. For example that it only shows data for monday. These are the formulas i have tried, but both don't work:

Count ({$<weekday={"Ma"}>}LOAD_INDEX) 

Count ({$<weekday(L_begin_date.date)={"Ma"}>}LOAD_INDEX) 

Making a filter with weekdays is not an option for me.

Thanks in advance

1 Solution

Accepted Solutions
Nagaraju_KCS
Specialist III
Specialist III

Create derived column in the load editor, like below

Load  L_begin_date.date

          Weekday(L_begin_date.date) as WeekDay  // Derived column

From table;


View solution in original post

12 Replies
sunny_talwar
MVP
MVP

Do you have a field called weekday in your application? What format does it have?

pascaldijkshoor
Creator
Creator
Author

I don't have a field called weekday in my dataset. I have tried to add calculated field in the data manger, but there is no weekday function in the data manager.

Normally when i want to use weekday as a dimension i use the formula: =weekday (L_begin_date.date)

sunny_talwar
MVP
MVP

Try this

Count({$<L_begin_date.date = {"=WeekDay(L_begin_date.date) = 'Ma'}>} LOAD_INDEX)

pascaldijkshoor
Creator
Creator
Author

When i enter this i get an error

sunny_talwar
MVP
MVP

My bad, I missed the ending double quote... try this

Count({$<L_begin_date.date = {"=WeekDay(L_begin_date.date) = 'Ma'"}>} LOAD_INDEX)

Nagaraju_KCS
Specialist III
Specialist III

One option,

Create back end weekday (L_begin_date.date) as Weekday.

Simply use your expression

Count ({$<Weekday={"Ma"}>}LOAD_INDEX)

pascaldijkshoor
Creator
Creator
Author

Then i only get 0 as values. Thanks for your replies anyway

pascaldijkshoor
Creator
Creator
Author

Do you mean to add this line in the load editor?

sunny_talwar
MVP
MVP

May be try with the number

Count({$<L_begin_date.date = {"=WeekDay(L_begin_date.date) = 1"}>} LOAD_INDEX)

I used 1, but not sure what weekday Monday is for you... replace 1 with whatever it is