Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter data on workdays and weekends

Dear Qlikview developers,

I'm developing a dashboard where I need to display a chart with the time or date on the x-axis and the gas consumption on the y-axis.
I need to 'filter' the data according to the type of day. I need to make a distinction between workdays and weekends.

For example, when i click on a button "Mon - Fri", only those days with gasconsumption values must be shown in the chart.
The same applies to weekends.
How can I accomplish the above? I'm have a master calendar.

Thanks for your help

Kind regards,

Nazeem

edit: Added the fact that I'm have a master calendar.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Create a field that group your dates in the script:

LOAD

     DATEFIELD,

     if(weekday(DATEFIELD) <5, 'Mon - Fri', 'Weekend') as WeekDayGrouping,

      ..

View solution in original post

2 Replies
swuehl
MVP
MVP

Create a field that group your dates in the script:

LOAD

     DATEFIELD,

     if(weekday(DATEFIELD) <5, 'Mon - Fri', 'Weekend') as WeekDayGrouping,

      ..

Not applicable
Author

I forgot to mention that I have a master calendar.
Is your provided solution still the best, or is there a 'better' solution which makes use of the master calenda

Thank you for your answer!
I implemented your code-snippet into the master calendar

Message was edited by: nazeemsoeltan