Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamically filtering data based on selections

Hi,

I had a question: Can I filter data in QV dynamically like this: When I select 2 months say Jan , Feb, data should get filtered to give me latest date for each store.Then I want to calculate all my charts exoressions based on this filtered data.Is this possible?

Sample Data:

Month Qtr  Date         Store 

Jan    Q1   1/1/2014    A

Feb    Q1   1/2/2014    A

Mar    Q1   1/3/2014    A

Jan    Q1   1/1/2014    B

Feb    Q1   1/2/2014    B

Mar    Q1   1/3/2014    B

When I select Jan, Feb in QV, Data should become:

Month Qtr  Date         Store 

Feb    Q1   1/2/2014    A

Feb    Q1   1/2/2014    B

And all Charts in my QV app should use above data to calculate expressions.

Please help out!Thanks in advance!

2 Replies
Anonymous
Not applicable
Author

hi try this

Only({$<[MonthYear]={"$(=Date(Max(MonthYear), 'MMM-YYYY'))"}, Date={"$(=date(max(date),'DD/MM/YYYY'))">} store )

Not applicable
Author

Hi Allu,

Thanks so much for your reply.But maybe I should explain my requirement more clearly.I need to do calculations in charts based on the filtered data.So for example:

When I click Q3 in filter, data should filter such that each Store No. should have only latest sale date.Then in the pivot table it should sum the sales only for these latest sale dates.Similarly, sum(sales) for a store should sum sales for only those store No.s with latest dates as for a period selected() MonthYear/Qtr/2 visit Dates/2 Months). This should apply for any period filter: Quarter, MonthYear, Date.

I have attached QVW for reference.

In Screenshot: it currently adds sales for all dates of Store No 1 in Q3.I would need only latest Date of Store no 1 in Q3.

Hope this made sense! Thanks for your help!Hope this is possible in Qlikview?