Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
madmax88
Creator II
Creator II

Rolling 12Months doesn't show current month

Hi

I've checke other threads but I dont get the correct result. I need the rolling 12Months average and therefor I have following expression

num(
sum({$<Month={">=$(=ADDMONTHS(MAX(Month),-11))<=$(=MAX(Month))"}>}[Sales])/
sum({$<Month={">=$(=ADDMONTHS(MAX(Month), -11))<=$(=MAX(Month))"}>}[Volume]),'#.#%')

Also tried other one

num(
sum({$<Month={"$(='>' & Date(MonthEnd(Max(Month), -12)) & '<=' & Date(MonthEnd(Max(Month))))"}>}[Sales])/
sum({$<Month={"$(='>' & Date(MonthEnd(Max(Month), -12)) & '<=' & Date(MonthEnd(Max(Month))))"}>}[Volume]),'#.#%')

Values are correct from han to november but it doesn't show me the december (Data Set is from January to December). What am I doing wrong?

1 Solution

Accepted Solutions
madmax88
Creator II
Creator II
Author

Problem was solved by num funcktion. num(Month) as Monat_Nr and then it works with the same expression

View solution in original post

4 Replies
Anil_Babu_Samineni

I would rather think, Simplest way as follows

Num(RangeSum(Above((Sum(Sales)/Sum(Volume))), 0, Rowno(TOTAL)), '#,#%')

Or

Num(RangeSum(Above((Sum(Sales)/Sum(Volume))), 0, 12), '#,#%')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
madmax88
Creator II
Creator II
Author

Doesn't work

It give me completely different values. The table where the data come from is a table by month. With ur expression its accumulate the value:

Jan 1

Feb 2.03

MAr 3.03

Apr 4.03

etc.

Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

please go through this change the setting according to the requirement

https://community.qlik.com/t5/New-to-Qlik-Sense/Cumulative-Bar-chart-help/td-p/1671663

Hope this helps

Thanks

Thanks and Regards
Kashyap.R
madmax88
Creator II
Creator II
Author

Problem was solved by num funcktion. num(Month) as Monat_Nr and then it works with the same expression