Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I am doing month on month comparisons for KPIs. I want to create a situation where if the user filters for a period, the list box automatically ticks the month before that as well..
Otherwise, only the current month calculation works.. Is there any way to do that?
Thanking you in advance ,
Lucille
Hi
Try like this
Document properties -> Trigger -> Field Event Trigger -> Month -> On Select
Action
Select in Field : Month
Search String:
='('& Concat(DISTINCT {$+<Month = {"$(=Month(MakeDate(Max(Year), Min(Month) -1)))"}>}Month, '|') & ')'
May be use triggers to accomplish this.
UPDATE: Check out the attached qvw file.
Awesome thank you.. I can't seem to see the attached qvw file mentioned above?
Open this link: Re: list boxes - force filter 2 values
Hi
Try like this
Document properties -> Trigger -> Field Event Trigger -> Month -> On Select
Action
Select in Field : Month
Search String:
='('& Concat(DISTINCT {$+<Month = {"$(=Month(MakeDate(Max(Year), Min(Month) -1)))"}>}Month, '|') & ')'
Hi Sunny,
Instead of Max(Month) , we can use Min(Month) right? Please suggest.
Thanks for your comments Mayil
If we are only selecting a single Month, does it matter that if we use Min or Max (or even Only)? I might be missing something, but what is your logic for using Min(Month) instead of Max(Month)?
Best,
Sunny
Hi Sunny,
For example, the user select 2 consecutive month like Mar and Apr. In that case Min(Month) -1 gives Feb.
so three month will get select. Feb, Mar and Apr.
the list box automatically ticks the month before that as well.
But anyway, Its depends on the user requirements. Maximum 2 month or "ticks the month before".
Oh okay, but ya I was under the impression that only two months need to be selected based on selection in a single month. But you are right, if the they want to select the third month when 2 are selected then Min(Date) would work.
Thank you so much I have managed to get it to work for the Period YYYYMM. I am still struggling to get it to work on the month name, I suspect I just need to play around to get it to see the month name as a date and not as a string