Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a field named [Latest Date] which contains a value 2011-12 which means Dec 2011.I have a month field which contains data Jan-Dec.If suppose my value in the [Latest Date] is Nov then when i click on the button I should be able to select data from Jan-Nov and in the same way if [Latest Date] contain Sep as data then by clicking on the button I should be able to select data from JAn-Sep.. I mean to say based on the data in [Latest Date] I should be dynimically able to select the appropriate months in the Month field.Currently I am doing this manually I want to do the same dynamically.
Any help would be greatly appreciated..
Thanks in advance..
Hi,
You used 1(one) instead | (pipe symbol)
='('&Concat(Distinct Month(ValueLoop(YearStart(Date#(Max([Latest Date]),'YYYY-MM')),MonthStart(Date#(Max([Latest Date]),'YYYY-MM')))),'|')&')'
Celambarasan
Any suggestions from any one would be grealty appreciated..
Hi,
Did you tried with search string as
='('&Concat(Distinct Month(ValueLoop(YearStart(Today()),MonthStart(Today()))),'|')&')'
Hope it helps
Celambarasan
on my understanding to your question need year to date values, just ytd function in qlik view which wil help you to give the values based on latest date field column. If my understanding is not correct, please brief ur question.
Hi,
If you need to do selection only means use below
='('&Concat(Distinct Month(ValueLoop(YearStart(Max([Latest Date])),MonthStart(Max([Latest Date])))),'|')&')'
Instead use setanalysis
Sum({<DateField={">=$(=YearStart([Latest Date]))<=$(=Max([Latest Date]))"}>} Sales)
Celambarasan
Hope ur solution should work.. but the data in my [Latest date] field is a plain text 2011-12 .. It is not in the data format now I face a issue in getting the month out of it.. I can extract it using subfiled but how do i map it with month names.???
Hi,
If you need to do selection only means use below
='('&Concat(Distinct Month(ValueLoop(YearStart(Date#(Max([Latest Date]),'YYYY-MM')),MonthStart(Date#(Max([Latest Date]),'YYYY-MM')))),'|')&')'
Instead use setanalysis
Sum({<DateField={">=$(=YearStart(Date#(Max([Latest Date]),'YYYY-MM')))<=$(=Date#(Max([Latest Date]),'YYYY-MM'))"}>} Sales)
Check with this
Celambarasan
Hi ,
I have made the changes as said by you in the previous mail.. but still I am unable to find the result that i am looking for.. PFA for the expresssion.. I have 2011- 12 in the [Project As of Date].. and I want Jan to Dec values in the month field to be selected.. Can u plz check and tell me where the expression is failing..
Thanks in advance...
Hi,
You used 1(one) instead | (pipe symbol)
='('&Concat(Distinct Month(ValueLoop(YearStart(Date#(Max([Latest Date]),'YYYY-MM')),MonthStart(Date#(Max([Latest Date]),'YYYY-MM')))),'|')&')'
Celambarasan
Oops Sorry I have not noticed that.. It works.. Thanks for ur time..