Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

zahidrahim_ocp
Contributor

Date Filter to impact data

Dear Experts,

I am making an aging report. Suppose i have 2 tables:

Buckets:

Days     Bucket

1                 0-30

2                 0-30

3                 0-30

4                 0-30

5                 0-30

31               31-60

32               31-60

33               31-60

61               31-60

62               31-60

63               31-60

Main_query

TRDate                    Stock_Qty

01-SEP-2017          10

02-SEP-2017          20

05-SEP-2017          30

10-SEP-2017          40

Load Script joins these two tables like below:

SYSDATE-TRDATE  = Days

to get the bucket wise quantity.

Now the issue is instead of a fixed SYSDATE i want to give a date filter on front end and the then buckets should be calculated as per the date selected and data change accordingly.

Regards,

Zahid Rahim

Tags (1)
6 Replies
shraddha_g
Honored Contributor III

Re: Date Filter to impact data

create a variable as vDate.

declare it as vDate = Max(DateField)

then use it while creating buckets in Dimension section of chart.

For ex.

If(Date($(vDate))-Date(TRDATE) >0 and Date($(vDate))-Date(TRDATE) <30, '0-30 Days',

             If(Date($(vDate))-Date(TRDATE) >31 and Date($(vDate))-Date(TRDATE) <60, '31-60 Days'))

zahidrahim_ocp
Contributor

Re: Date Filter to impact data

Dear Sharadha,

Using it as Dimension gave Invalid Dimension then i put it in measure and worked.

But the main problem is i want to show all buckets and data keep appearing in relevant buckets. rather than as a separate column.

Regards,

Zahid Rahim

shraddha_g
Honored Contributor III

Re: Date Filter to impact data

Share sample app

zahidrahim_ocp
Contributor

Re: Date Filter to impact data

How can we attach a qvf file with the message i am sorry as i never attached before.

zahidrahim_ocp
Contributor

Re: Date Filter to impact data

I have successfully attached qvf. now we have to replace today with the date selected in the filter.

zahidrahim_ocp
Contributor

Re: Date Filter to impact data

Awaiting any help badly