Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
JASalinas
Creator
Creator

Exclude Negative Numbers from an expression on KPI

Hi my friends I have a KPI and the Expression Dimension i wrote this:

Sum({<[Account]={"138*", "322*", "338*", "A*", "ER*", "ET*", "R*"}>}(Amount)) Here i have amounts positives and amounts negatives but only want the sum of the amounts positives please!.

Thank you very much

Regards

JA Salinas

Labels (4)
1 Solution

Accepted Solutions
JASalinas
Creator
Creator
Author

Aquí la respuesta... el FUND no lo tomen en cuenta porque es una dimensión de nuestra contabilidad.

FABS(Sum({<[ACCNT_CODE]={"=Aggr(Sum([AMOUNT]),ACCNT_CODE)<0"}> - (1-$<[ACCNT_CODE]={"12*", "13*", "14*","32*", "33*", "34*","A*", "E*", "R*"}>) - <[FUND]={"20"}>}[AMOUNT]))

View solution in original post

3 Replies
Lisa_P
Employee
Employee

Add that as another condition in set analysis:
Sum({<[Account]={"138*", "322*", "338*", "A*", "ER*", "ET*", "R*"}, Amount={">0"}>}(Amount)) 

JASalinas
Creator
Creator
Author

Hi Lisa thank you for you answer

I tried to do that and it didn't work, i need Exclude the Amount Negative, i dont know if can to do from Script Editor... if i have a Pivot Table show me this

JASalinas_0-1587945587805.png

Thank you again

JASalinas
Creator
Creator
Author

Aquí la respuesta... el FUND no lo tomen en cuenta porque es una dimensión de nuestra contabilidad.

FABS(Sum({<[ACCNT_CODE]={"=Aggr(Sum([AMOUNT]),ACCNT_CODE)<0"}> - (1-$<[ACCNT_CODE]={"12*", "13*", "14*","32*", "33*", "34*","A*", "E*", "R*"}>) - <[FUND]={"20"}>}[AMOUNT]))