Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have encountered an issue when picking dates using the variable input:
When I select Jan 2016 under "From", the "To" section shows normal choices (Jan 2016 onwards).
But when I changed the "From" filter to other months (for example Feb 2016), the "To" section appears in error, only showing Jan 2024.
These two drop down are the Variable input in Qlik Dashboard bundle.
I set the Dynamic value as below:
='From' & '|' & Concat(distinct {1} PRODUCTION_MONTH & '~' & MonthName(PRODUCTION_MONTH), '|')
= 'To' & '|' & Concat(distinct {1< PRODUCTION_MONTH = {">=$(=NUM(vFromYrMonth))"} >} PRODUCTION_MONTH & '~' & MonthName(PRODUCTION_MONTH), '|')
I have double checked the data source and the month data looks fine. I also found that if I click reload data, the months having above error will change (i.e. Select Jan 2016 will appear a list of Jan 2024, but select Feb 2016 will appear normal).
Any idea why this would happen? All help appreciated.
Thanks a lot
Ok, Lets do it this way.
Create 2 island Month lists via load script.
ToCalendar:
Load distinct PRODUCTION_MONTH as TO_Month
Resident Data;
FromCalendar:
Load distinct PRODUCTION_MONTH as From_Month
Resident Data;
& use these two fields in your input variable as follows:
='From' & '|' & Concat(distinct TO_Month & '~' & MonthName(TO_Month), '|')
= 'To' & '|' & Concat(distinct {1< From_Month = {">=$(=NUM(max(TO_Month)))"} >} From_Month & '~' & MonthName(From_Month), '|')
You will also have to modify your set expressions accordingly, just check that part.
Regards,
Rohan.
Hi,
Can you share the defination of the variable that you have used : vFromYrMonth ?
Regards,
Rohan.
Hi Rohan,
Both definition and value of vFromYrMonth are set to "From"
Thanks
Hi,
These values would not be the default ones. I believe these are the variable definitions after you have selected from the drop down. I needed the default definitions that you must have set prior to selections.
Regards,
Rohan.
Hi Rohan,
Sorry but I am not sure how to find the default definition of this vFromYrMonth
I can only find other variables in data load editor
Thanks
Ok, Lets do it this way.
Create 2 island Month lists via load script.
ToCalendar:
Load distinct PRODUCTION_MONTH as TO_Month
Resident Data;
FromCalendar:
Load distinct PRODUCTION_MONTH as From_Month
Resident Data;
& use these two fields in your input variable as follows:
='From' & '|' & Concat(distinct TO_Month & '~' & MonthName(TO_Month), '|')
= 'To' & '|' & Concat(distinct {1< From_Month = {">=$(=NUM(max(TO_Month)))"} >} From_Month & '~' & MonthName(From_Month), '|')
You will also have to modify your set expressions accordingly, just check that part.
Regards,
Rohan.
I followed your instruction to
1. Created ToCalendar & FromCalendar via load script
2. Updated the dynamic value to
='From' & '|' & Concat(distinct TO_Month & '~' & MonthName(TO_Month), '|')
= 'To' & '|' & Concat(distinct {1< From_Month = {">=$(=NUM(max(TO_Month)))"} >} From_Month & '~' & MonthName(From_Month), '|')
But may I know where I can modify the set expressions and what to modify?
And now it shows Jan 2024 when I chose any month under "From"
Hi,
just update :
='From' & '|' & Concat(distinct From_Month & '~' & MonthName(From_Month), '|')
= 'To' & '|' & Concat(distinct {1< TO_Month = {">=$(=NUM(max(From_Month)))"} >} TO_Month & '~' & MonthName(TO_Month), '|')
This was a miss at my previous reply. You have kept the new tables unlinked from the rest of your data model, right ?
If you can share a sample of Set expression where you have used those date range variables, i can try to help you with the changes required.
Regards,
Rohan.
Hi Rohan,
Thanks for the update. I have checked the new tables are unlinked from the rest of the data model.
And the previous set expression using the date range variables is:
=If(GetselectedCount(PRODUCTION_MONTH) > 0, 'Month Range: ' & MonthName(Min(PRODUCTION_MONTH)) & ' - ' & MonthName(Max(PRODUCTION_MONTH)), '')