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: 
gasparbenito
Contributor II
Contributor II

Using if in KPI object SUM

Hi all, 

In this table: 

ID_MaterialContadorDenominadorUMBSum(cantidad)UMBaseSum(Contador)Palets
TOTAL 12.568.552361.326072.137.406012.568.5529.055
10000811KI12.742KI1 
100008120UN12.742KI1 
100008721PAL12.742KI72177
10000810003040KG12.742KI1.000 
10001211KI6.885KI1 
100012140UN6.885KI1 
100012961PAL6.885KI9672
10001210002400KG6.885KI1.000 
10002011KI37.770KI1 
100020124UN37.770KI1 
100020961PAL37.770KI96393
10002010004560KG37.770KI1.000 
10009211KI688KI1 
100092120UN688KI1 
1000922501PAL688KI2503
10009210001240KG688KI1.000 
10009411KI7.297KI1 
10009411UN7.297KI1 
100094721PAL7.297KI72101
etc       

 

The field 'Palets' is : 
if (UMB='PAL', SUM(cantidad)/SUM(Contador),'')

But if I write this expression in a KPI it does not work...

Could anyone give me some advice?

Thank you!

 

Labels (1)
1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

You mean want the division to happen on each row?
why not
SUM({<UMB={'PAL'}>}cantidad/Contador)

to help share some sample data and example of what the output you desire


View solution in original post

6 Replies
dplr-rn
Partner - Master III
Partner - Master III

Use set analysis instead of if statement
somewthing like
SUM({<UMB={'PAL'}>}cantidad)/SUM({<UMB={'PAL'}>}Contador)
gasparbenito
Contributor II
Contributor II
Author

I had tried with that, but: 

SUM({<UMB={'PAL'}>}cantidad) = 28.587.830

SUM({<UMB={'PAL'}>}Contador)=12.502.972

KPI Result = 2.28, instead of the sum of each row (9055)

 

Thanks

 

dplr-rn
Partner - Master III
Partner - Master III

You mean want the division to happen on each row?
why not
SUM({<UMB={'PAL'}>}cantidad/Contador)

to help share some sample data and example of what the output you desire


gasparbenito
Contributor II
Contributor II
Author

yes!

Now it works perfectly!

Thank you very much

So Kind!

vriesahm
Contributor II
Contributor II

Try this:

Sum({<UMB = {'PAL'}>} (cantidad / Contador))

gasparbenito
Contributor II
Contributor II
Author

Thank you Vriesahm

That was!