Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
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?

18 Replies
antoniodneto
Creator II
Creator II
Author

Sunny, now is accumulating. Now I need to fix 12 months accumulated for each month For example my MAX date is 201812, now is accumulating all the months. For 201812 it should accumulate 201801-201812, for 201811 = 201712-201811.
sunny_talwar

What is it doing now?

antoniodneto
Creator II
Creator II
Author

I mean, my max date is 201812 now is accumulating since 201612 my min date. In 201812 I want to accumulate only 12 months, that is 201801-201812. In 201811 to accumulate 201712-201811 and so on.
sunny_talwar

RangeSum(Above(Sum(MBB_CREDITO), 0, 12))
antoniodneto
Creator II
Creator II
Author

Sunny PERFECT!!! Now it works. And now I need to add the avg for this expression.
sunny_talwar


@antoniodneto wrote:
And now I need to add the avg for this expression.

Is that a question for me or do you already know how to do this?

antoniodneto
Creator II
Creator II
Author

Hi Sunny,

That was a question but I solved. Tks again!!

If you could help me with a new one question that I just created, I would be great.

Tks a lot, always saving me.

antoniodneto
Creator II
Creator II
Author

Hi @sunny_talwar !!

I'm using your expression that you helped me:

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

I have DATE values from JAN/2016 until DEC/2018, but I just need to show starting from DEC/2016.

So now I'm using

RangeSum(Above(Sum({<DATE={">=DEC/2016"}>}MBB_CREDITO), 0, 12))

It works on graph starting DEC/2016, but is calculating wrong because it seems "excluding" the previous months. How can I fix that?

 

sunny_talwar

Try this

RangeSum(Above(Sum(MBB_CREDITO), 0, 12)) * Avg({<DATE={">=DEC/2016"}>} 1)