Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
antoniodneto
Creator II
Creator II

Help with Expression

Hi guys,

I'm tryng to solve one expression.

When I use the expression =SUM({<DATA={">=$(=MAX(DATA,12))<=$(=MAX(DATA))"}>}MBB_CREDITO)
/
AVG(Aggr(SUM({<DATA={">=$(=MAX(DATA,12))"}>}RISCO_TOTAL), DATA)) in a KPI it works, I should SUM the last 12 months accumulated of MBB_CREDITO and DIV by Avg of the SUM of last 12 months RISCO_TOTAL acumulated

But when I put it on a line chart, or filter another month It doesn't work.

 

Can you guys help me?

1 Solution

Accepted Solutions
sunny_talwar

RangeSum(Above(Sum(MBB_CREDITO), 0, 12))

View solution in original post

18 Replies
Channa
Specialist III
Specialist III

 

=SUM({<DATA={">=$(=MAX(DATA,12))<=$(=MAX(DATA))"}>}MBB_CREDITO)

if yo put this one alone also it is not working??

 

you need to check AGGR using on which dimension and is it same as  ur line chart dimension..

Channa
antoniodneto
Creator II
Creator II
Author

Hi Channa! Only work into a KPI when I use on a line chart just returns the value for the month. I don't know how to build my expression in a line chart.
sunny_talwar

I think you might need to use RangeSum(Above()) or RangeSum(Below()) to accumulate the values in a line chart where month is used as a dimension. It would be easier to help if you are able to share a sample.

antoniodneto
Creator II
Creator II
Author

Hi Sunny, Could you help me? Sorry my IT blocked the QMC to export.
sunny_talwar

Sure, but help you how?

antoniodneto
Creator II
Creator II
Author

I have two fields to calc. One is MBB that one I need to SUM and accumulate the last 12 months. Another field is RISCO that one I need get the AVG of SUM accumulated the last 12 months.
sunny_talwar

okay... so try using RangeSum(Above()) function and see what you get

antoniodneto
Creator II
Creator II
Author

For example: RangeSum(Above(SUM(MBB_CREDITO))) It is just shows the previous month value.
sunny_talwar

Something like this

RangeSum(Above(Sum(MBB_CREDITO), 0, RowNo()))