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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kushal_Chawda

Date Filter Based on Field selection

Dear All,

I have 3 date fileld Date1, Date2, Date3.

I am creating inline table as

load * inline [

Filed

Date1,

Date2,

Date3,

];

There is two calender objects to select FromDate to ToDate. I am using button to apply Date filter.

My requirement is,

When I select Date1 with FromDate & ToDate from calender and click on Apply filter button den data should be filtered from Date1 field and also should reflect on chart.

similar action should happen when I select Date2 and so on.

Regards,

Kush

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

Glad to know. The only change you need is modifying the field in the action of the button to

=GetFieldSelections(DateType)

So it will apply the selections in the variables to the date field selected.

Hope that makes sense.

Miguel

View solution in original post

8 Replies
Miguel_Angel_Baeyens

Hello Kush,

You a variable instead in the calendar object, as in this application, then use a set analysis in the chart expressions to limit results to those dates.

Hope that helps.

Miguel

sujeetsingh
Master III
Master III

Just a simple and to the point answer by Miguel!!!!

Kushal_Chawda
Author

Hi Miguel,

Thanx for the quick reply... I got your point But can you tell me how can I filter the dates by selecting the other date field.

I have 3 date fieds.

Miguel_Angel_Baeyens

Hi,

Create a new variable called vDateFieldName that stores

=GetFieldSelections(Filed)

So when you call at $(vDateFieldName) the name of the field selected from those three is in the variable, therefore comparing to the selected date field.

Hope that helps.

Miguel

Kushal_Chawda
Author

Hi

In attached file I have explained what I need is.

Actually I wan to do it in that way only but not getting.

Regards,

Kush

Kushal_Chawda
Author

Hi Miguel,

Finally i got the solution after trying hard.

Miguel_Angel_Baeyens

Hi,

Glad to know. The only change you need is modifying the field in the action of the button to

=GetFieldSelections(DateType)

So it will apply the selections in the variables to the date field selected.

Hope that makes sense.

Miguel

Kushal_Chawda
Author

Hi

Thnx Miguel..

Only difference I made is I have used variable in Action..