Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

pascaldijkshoor
Contributor

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
qv_testing
Valued Contributor

Re: Weekday in set analysis

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;


12 Replies
MVP
MVP

Re: Weekday in set analysis

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

pascaldijkshoor
Contributor

Re: Weekday in set analysis

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)

MVP
MVP

Re: Weekday in set analysis

Try this

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

pascaldijkshoor
Contributor

Re: Weekday in set analysis

When i enter this i get an error

MVP
MVP

Re: Weekday in set analysis

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

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

qv_testing
Valued Contributor

Re: Weekday in set analysis

One option,

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

Simply use your expression

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

pascaldijkshoor
Contributor

Re: Weekday in set analysis

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

pascaldijkshoor
Contributor

Re: Weekday in set analysis

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

MVP
MVP

Re: Weekday in set analysis

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