Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
MK97
Partner - Contributor
Partner - Contributor

Percentage calculation

Hello,

I have a problem with calculating the percentages between two values: Sum(X)/Sum(Y)*100. 

Current calculation Z= :

sum({<Cal_RollingREM.CalendarRollingIdentical = {1},I.ItemName = {'Rent'}>}X)
/
sum({<Cal_RollingREM.CalendarRollingIdentical = {1}>}Y)
*100

MK97_0-1663602591543.png

As you can see I'm getting wrong Total and arithmetically good column values, but I need different result. I need total to be 100% and column values to reflect part of Total value. In example:

MK97_4-1663604035377.png

 

I have tried different calculations. With Sum(Aggr(...)) I got wrong values, but with the Total(Z) I got correct Total values but wrong column values:

Total(Z) calculation:

(sum({<Cal_RollingREM.CalendarRollingIdentical = {1},I.ItemName = {'Rent'}>}X) / sum({<Cal_RollingREM.CalendarRollingIdentical = {1}>}Y)*100)

/

(sum({<Cal_RollingREM.CalendarRollingIdentical = {1},I.ItemName = {'Rent'}>}Total X) / sum({<Cal_RollingREM.CalendarRollingIdentical = {1}>}Total Y)*100)

MK97_2-1663603294635.png

Object ID is not unique value, it can hold different X and Y values:

MK97_1-1663603186192.png

Thank you in advance 🙂

 

Labels (2)
0 Replies