Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kavita25
Partner - Specialist
Partner - Specialist

How to show last 3 months data but show values on max month

Helloo Every1,

I want to show last 3 months values, but the sum of last 3 months should show on one bar i.e maxmonth(on selection)

Example

Aug,Jul,Jun

20,10,30

sum of three months is 60, so it should be displayed on Aug bar.

I am able to get last 3 months summation, but its not displayed on desired bar i.e AUG

Regards,

Kavita

9 Replies
maxgro
MVP
MVP

kavita25
Partner - Specialist
Partner - Specialist
Author

Thank you for the link....

That's for rolling 3,6 12 months...

What if I want to show the summation for the selection month and all previous month...

For an e.g: Aug 2015 is selected, I want to display from Apr till Aug 2015 values in Aug 2015 bar.

Please help!!!

Its urgent.....

Anonymous
Not applicable

This is exactly what I want to find out as well, did you manage to solve this Kavita?

Thanks

Gareth

Anonymous
Not applicable

No..But the above solution is bit helpful.

ChennaiahNallani
Creator III
Creator III

=Sum({<Your MonthYear filed ={">=$(=Date(addmonths(Max(Your MonthYear filed), -2), 'MMM-YY'))"} >} Your FiledName)

Anonymous
Not applicable

Hi Kavita

I've figured it out,

count(

  {<

  YOUR_DATE = {">=$(=MonthStart(addmonths(max(YOUR_DATE),-2)))  <$(=Monthstart(addmonths(max(YOUR_DATE),1)))"}

  >}

  YOUR_UNITS)

this shows units in the last 3 months when selecting a month on a list box.

kavita25
Partner - Specialist
Partner - Specialist
Author

Post a sample application with your logic.

Anonymous
Not applicable

Unfortunately I cannot provide sample data,

My expression works for what I am trying to do which is show the units for each buyer within the last 3 months.

I didn't just want to show the current last 3 months but a dynamic last 3 months. So if I select Jan-15 it will show me all units for Nov-14, Dec-15 and Jan-15 per buyer.

Kushal_Chawda

try


sum(aggr(rangesum(above(total sum({<MonthYear=>}Amount),0,3)),MonthYear))