6 Replies Latest reply: Jun 30, 2017 12:36 PM by kumarsuresh lulu

year selection

If We select year, chart should display from previous month to preceeding 12 months.

I have written the below expression but I am getting issue, like If I select 2017 year it is taking from prev month upto Jan 2017.

But I need to display upto June 2016.

Can any one suggest me this?

• Re: year selection

If(Getselectedcount(year)>0,

(if(NumOfFailures=0,

Sum({<EquipmentType={'GP-40MC'},CalendarMonth={'\$(vPrevMonthYear)'}

/

Sum({<CalendarMonth={'\$(vPrevMonthYear)'},EquipmentType={'GP-40MC'}

Sum( {<EquipmentType={'GP-40MC'},CalendarMonth={'\$(vMaxMonthYear)'},

/

Sum({<EquipmentType={'GP-40MC'},CalendarMonth={'\$(vMaxMonthYear)'},

))),

(if(NumOfFailures=0,

Sum({<EquipmentType={'GP-40MC'},CalendarMonth={'\$(vPrevMonthYear)'}

/

Sum({<CalendarMonth={'\$(vPrevMonthYear)'},EquipmentType={'GP-40MC'}

Sum( {<EquipmentType={'GP-40MC'},CalendarMonth={'\$(vMaxMonthYear)'},

/

Sum({<EquipmentType={'GP-40MC'},CalendarMonth={'\$(vMaxMonthYear)'},

))))

• Re: year selection

Why are you using set analysis on CalendarMonth field twice?

You know that the second one will not work, right? I don't see the reason to do this?

And what is NumOfFailures? Field? or Variable? Also, if it is a field, is this from a Island Table?

• Re: year selection

What is your expression? Did you remember to include Year field in your set analysis so that you can  exclude the selection in the Year field (the field where you are making selection)?

• Re: year selection

One is for month but I tried for year I dint get any result to show the scenario I copied

My only intention, When I am selecting Year from that year, month should display from previous month to preceding 12 months and if I select month that is coming properly.

Numoffailures is field that is not coming from the isolated table. that field is coming from the fact table which is integrated from different transaction tables

• Re: year selection

It might be easier to help if you can share a sample where you might be doing this... Would you be able to share a sample?

• Re: year selection

Hi Sunny,