If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
I am making an aging report. Suppose i have 2 tables:
Load Script joins these two tables like below:
Today()-TRDATE = Days
to get the bucket wise quantity.
Now the issue is instead of a fixed Today() 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.
If this is not possible then what are the workarounds i have.
I think it is a "what if" technique that you need to let the users define the Start date wich is today() in you case.
On qliksense you can do it with extensions, like this one: GitHub - erikwett/qsVariable: Variable extension for Qlik Sense
Hope it helps !
You could create a chart and a Calculated Dimension using an If() statement:
If($(vAgingDate) - TRDATE <= 30, '0 - 30',
If($(vAgingDate) - TRDATE <= 60, '31 - 60', '61 - 90',
If($(vAgingDate) - TRDATE <= 90, '61 - 90', '91 +')))
Your expression would be Sum(Stock_Qty).
Tweak the If() statement to incorporate all of your aging buckets.
I have created a variable with below syntax:
Then create a Master Item Dimension with below syntax:
=if (($(vDate) - FST_RCVD_DATE) <=30,'0-30'
Now when i add this dimension it says:
It is likely to be the date format of FST_RCVD_DATE. This needs to be a Dual or Num field so that QV can calculate the dimension values.
If your FST_RCVD_DATE really is in DD-MMM-YYYY format then I suggest using a Date#() function in the load script to convert it to a standard date format.
Date#(FST_RCVD_DATE, 'DD-MMM-YYYY') as FST_RCVD_DATE