Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sumeet-vaidya
Partner - Creator
Partner - Creator

Filter data based on Day for every Month

Dear all,

I have a scenario wherein I want my report to be filtered based on the day selected.

Eg. Please find below report format.

Case 1:

When User selects Day = 5,

Data for APR => 01-APR-2018 to 05-APR-2018

Data for MAY=> 01-MAY-2018 to 05-MAY-2018

Data for JUN=> 01-JUN-2018 to 05-JUN-2018 and so on would be filtered.

   

ChannelMonthAPRMAYJUNJULAUGTOTAL
A 2545856985309
B 1536457898272
C 121015144596
D 3545687858284
E 3645896958297
TOTAL 1231813023083441258

Please assist.

stalwar1hic

Thanks & Regards

Sumeet

5 Replies
timpoismans
Specialist
Specialist

In my opinion, using a Calendar table would work the best.

Most known Calendar tables provide Day, Week, Month, Quarter, Year fields for the dates.

Users could then select Day 1 to Day 5 and perhaps the year, in case of multiple years, without selecting any month or quarter. This would limit the data shown to Day 1 to Day 5 for every month that's available in the selected year, or all time if not selected any.

sumeet-vaidya
Partner - Creator
Partner - Creator
Author

Dear Tim,

Calendar is used already. There is date field in table where user requires day selection and as per that day data needs to be filtered for every month.

Regards

Sumeet

timpoismans
Specialist
Specialist

Perhaps I'm misunderstanding this, but if you are already using a Calendar, there shouldn't be an issue?

Include a selection-object on the [Day]-field of your Calendar on the views that need day selections and users can select 1->5, 7->10, 4->27, any range they want.

As long as they don't select a month, data will be limited to the selected days.

ajaykumar1
Creator III
Creator III

Try Like this;

If (Monthstart(date((YourDateFiled)>= 1 and monthstart(date(YourDateFiled)<=5,'1 To 5',

If (Monthstart(date((YourDateFiled)>= 6 and monthstart(date(YourDateFiled)<=10,'6 To 10'

If (Monthstart(date((YourDateFiled)>= 11 and monthstart(date(YourDateFiled)<=16,'11 To 16'

If (Monthstart(date((YourDateFiled)>= 17 and monthstart(date(YourDateFiled)<=22,'17 To 23'

If (Monthstart(date((YourDateFiled)>= 23 and monthstart(date(YourDateFiled)<=28,'23 To 28','Remianing'))))) as Month

sumeet-vaidya
Partner - Creator
Partner - Creator
Author

Hi Ajay,

I need to write in expression as Channel & Month are my dimensions.

Regards

Sumeet