Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rsdhavle
Creator III
Creator III

Aggregation issue when expression has rolling 12 months

Hi,

I have one expression with rolling 12 months when i write this expression in text object calculation is perfect. When i write this expression against Month Dimension in a straight table it gives me incorrect numbers as it seems aggregation is happening. How can we achieve so that it will give me correct expression value against each month.

13 Replies
PrashantSangle

Hi,

can you post your expression

might be you need nullify Month field in expression

REgards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
snehamahaveer
Creator
Creator

Hi Rohan,

Why don't you try using RangeSum() function instead?

rsdhavle
Creator III
Creator III
Author

Sum({$<Year=,MONTH_SHORT_NAME=,YearMonth={'>$(=Max(YearMonth)-100) <=$(=Max(YearMonth))'},Prod1 -={'ABC'}>} Expense) /

SUM({<Year=,MONTH_SHORT_NAME=,YearMonth={'>$(=Max(YearMonth)-100) <=$(=Max(YearMonth))'}>}Rev)/1000

This is sample expression i am using against Month Dimension

rsdhavle
Creator III
Creator III
Author

RangeSum on total expression or instead of SUM?

snehamahaveer
Creator
Creator

Can you add an image or sample qvw. ?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See here: Calculating rolling n-period totals, averages or other aggregations


talk is cheap, supply exceeds demand
rsdhavle
Creator III
Creator III
Author

Hi Sneha,

This is sample formula.

Sum({$<Year=,MONTH_SHORT_NAME=,YearMonth={'>$(=Max(YearMonth)-100) <=$(=Max(YearMonth))'},Prod1 -={'ABC'}>} Expense) /

SUM({<Year=,MONTH_SHORT_NAME=,YearMonth={'>$(=Max(YearMonth)-100) <=$(=Max(YearMonth))'}>}Rev)/1000

Even if i use Rangesum instead of Sum it gives incorrect values

rsdhavle
Creator III
Creator III
Author

I tried using Rangesum options however i get different values when i use that function

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

That's amazing. An expression normally returns only one value. And if you don't change the data or the selections it's always the same value too.


talk is cheap, supply exceeds demand