Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Default selection in Month field based on a value in another field - Urgent help

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..

1 Solution

Accepted Solutions

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

View solution in original post

9 Replies
Not applicable

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

Not applicable

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

Not applicable

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

Not applicable

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

View solution in original post

Not applicable

Oops Sorry I have not noticed that.. It works.. Thanks for ur time..