Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Help needed for the attached application

Hi,

I need a help for the application attached,

when we open the application it should show current year and the completed month of the year(calendar Month). This should work only for the current year. Next when we change the year as 2010 or 2011 , the month selected should be the current selection of 2012. And later when we change the month , it should show the details for the selected month and year.

1 Solution

Accepted Solutions
Not applicable

Re: Help needed for the attached application

Does this workout?


Regards,

Kiran.

9 Replies
Not applicable

Re: Help needed for the attached application

Does this workout?


Regards,

Kiran.

Not applicable

Re: Help needed for the attached application

Hi Kiran,

Thanks a lot, it was perfect and useful. I need one more favour, if we select year as 2012 and if we are going to select any month greater than current calendar month , it should not be selected. Either when we click year 2012 ,months greater than calendar month should be grayed out, so that we may not able to select it.

For example consider the current month and year as 2012 , jan. So when we open the application the default data selected will be 2012 and jan because of the trigger we placed. But if the current month is jan, then the data to be selected should be dec 2011. This is because the data should be available in front end only for completed months. Since jan 2012 is the current calendar date, in which the month is incomplete. So for this scenario alone when the application opens, the front end should show data for 2011 dec.

Thanks,

Gerard

Not applicable

Re: Help needed for the attached application

Hi Kiran,

Even i added a expression as list box

=if(Month<=month(now()) and yearKey='2012',Month,if(yearKey<>'2012',Month))

So when we select year as 2012. The list box will show upto current month. But when i select any month for 2012 all the years are getting selected.

Can you please suggest any idea??

Thanks,

Gerard

Not applicable

Re: Help needed for the attached application

Hi,

In qlikview if you have data for 2012 till jun then only till jun can be selected (rather when we select month the selection of year will be cleared). Its better this way than using a trigger to do it as it can create some run time complications.

Regards,

Kiran Rokkam.

Not applicable

Re: Help needed for the attached application

Hi Kiran,

Please provide a solution of the below scenario.

For the same application, consider the current year and month is 2012 jan. For this scenario alone when we open the application it should show 2011 Dec. This should work for all future year Jan month alone.

This is because when open the applicaiton , default selection should be current year completed month. But for jan 2012, still jan month s not completed and it should show dec 2011 data. Can you please provide a solution for it.

Regards,

Gerard

Not applicable

Re: Help needed for the attached application

The document open trigger actions can have the below:

Month:

if(Max(Date)=MonthEnd(Max(Date)),Month(Max(Date)),Month(AddMonths(Max(Date),-1)))

Year:

if(Only(Month)='dec' and Max(Date)<>MonthEnd(Max(Date)),year(Max(Date))-1,Year(Max(Date)))

I didnt validate them but you can get the idea behind them.

Regards,

Kiran Rokkam.

Not applicable

Re: Help needed for the attached application

Hi Kiran,

I have used the trigger for month and year, but still when i open the application it shows jan 2012 instead of dec 2011.

I have attached the applicaion.

Regards,

Gerard

Not applicable

Re: Help needed for the attached application

Can you check this? I dont have time to validate now.

Not applicable

Re: Help needed for the attached application

Hi Kiran,

Sorry to disturb you again kiran, i need your help to fix this scenario. In the earlier application, when it opens it will check for the current year and completed month , so that it will select the completed months of current year in default. This will work fine for all the months except JAN. Because consider if the current calendar year month is 2012 Jan , then there will be no completed month for 2012, for this scenario when we open the applicaion it should select the previous year months( it should select all the months of previous year 2011).

Regards,

Gerard

Community Browser