Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression help

Hi all,

I got the following expression:

sum(aggr(rangesum(above(total sum({< Year = {$(=(max(Year)))}, DivisionName = {'XXXX'}, TodoSubtype = {'AB'}>} RevenueAmount/(1+Sales.Red)),0,4)),Week))

Now this should give me a 4 week average but it isn't. I tried moving my (()) but can't figure it out. Somebody got a clue what I'm doing wrong?

like week 4 gives a average over the past 4 weeks.

kind regards

3 Replies
MK_QSL
MVP
MVP

Try


SUM(Aggr(RangeSum(Above(Total SUM({<Year = {‘$(=Max(Year))’}, DivisionName = {'XXXX'}, TodoSubtype = {'AB'}>}RevenueAmount),0,4),Week)))


RangeSum(Above(Total SUM({<Year = {‘$(=Max(Year))’}, DivisionName = {'XXXX'}, TodoSubtype = {'AB'}>}RevenueAmount),0,4)

Not applicable
Author

hmm Both aren't me showing any data.

SUM(Aggr(RangeSum(Above(Total SUM({<Year = {‘$(=Max(Year))’}, DivisionName = {'2WIN'}, TodoSubtype = {'AB'}>}RevenueAmount)),0,4),Week))

It only gives me the number 4. Instead of a 4 weeks total.

tresesco
MVP
MVP

Could you post your sample qvw?