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: 
Anonymous
Not applicable

How to manage calender selection?

Hi,

I want when I select Year as ' 2018' , Month as 'Jan and feb' and Date as '1st to 27th'. I should get total sales for 2018, for entire jan (31 days) and feb (27 days) ie.  total sales for 58 days .

How to do that ?

Please help paint1.png

12 Replies
Anonymous
Not applicable
Author

By using calendar object I can implement the following but I want by using List box object can I implement the following?

Wlad_Masi
Employee
Employee

If you select data in the field day from 1 to 27, it will consider 2018 Jan from 1 to 27 and 2018 Feb from 1 to 27.
The best way  to achieve it would be using a calendar object, without using it, the best way would be not selecting the days, or having filter panes as start month and start day as well as end month and end day.

To help users find verified answers, please don't forget to mark a correct resolution or answer to your problem or question as correct.
ahmar811
Creator III
Creator III

Hi Kaul,

Please find some field level trigger for your requirement :

1- Year=max(Year)

2- Month = '("'&Concat({<Date={">=$(=Date(Addmonths(max(Date),-1),'DD-MM-YYYY'))<=$(=max(Date))"}>}Month,'"|"')& '")'

3- Date = '("'&Concat({<Date={">=$(=Date(Addmonths(max(Date),-1),'DD-MM-YYYY'))<=$(=max(Date))"}>}Date,'"|"')& '")'

I also attached qvw application for your help,I hone it will help you....

Regards

Ahmar

Anonymous
Not applicable
Author

Can You Please attach the application

ahmar811
Creator III
Creator III

I already attached the application please find Test.qvw file.

Anonymous
Not applicable
Author

Hi

Here the trigger is working But my requirement is different. I want when I select 2018,Jan ,Feb ,1 to 27th ) then I should get Total No. of days in chart under 2018 as  58.

(58 because jan has 31 days and feb has 27 days )

ahmar811
Creator III
Creator III

Put below expression on Sales expression to calculate your sales

=sum({<Date={">=$(=Date(MonthStart(AddMonths(max(Date),-1)),'DD-MM-YYYY'))<=$(=Date(max(Date),'DD-MM-YYYY'))"},Year=,Month=>}Sales)

I also attached qvw file for more details

Regards

Ahmar