Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
bhanupriyag
Partner - Contributor
Partner - Contributor

How to Calculate YTD and MAT in a chart expressions when we have Range period

Hi All,

We have a requirement to set a range period in slider. In chart expressions, we are calculating YTD, MAT and L3P based on Period Index.

For example I am in 2016P11 (Current Period), then my Period Index is 245. For YTD, we are giving expression as

=(sum({<Year={$(vCurrentYear)}, [Period Index]={"<=$(vCurrentPeriodIndex)"}>} $(vSelection))-
sum({<Year={$(vPreviousYear)},[Period Index]={"<=$(vYTDLastYear13)"}>} $(vSelection)))/
sum({<Year={$(vPreviousYear)},[Period Index]={"<=$(vYTDLastYear13)"}>} $(vSelection))

here vCurrentYear=2016,

vPreviousYear=2015,

vCurrentPeriodIndex=245,

vYTDLastYear13=vCurrentPeriodIndex-13(to get the previous year current period)


but, we are not getting any data when we set a range period(ex:2016P3 to 2016P11)in slider.

Can some one help me on this?


3 Replies
Not applicable

Hi Bhanu,

In expression, period index is used;Which data field are you using in Slider to show periods?

bhanupriyag
Partner - Contributor
Partner - Contributor
Author

Hi Lok Mikklineni,

Thanks for the reply.YearPeriod is the attribute which we used in Slider.

Not applicable

Hi,

If qvw file is not big can you upload?