Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3363

Calculate before aggregation in WEBI

$
0
0

Hi All,

 

I am new to business objects Webi. I have been working on below requirement

 

Below is how my detailed level data looks like

 

CalmonthPlantMaterial - KeyCores - ReturnedCores - Not Returned
Mar-16ABC1234-3357
Mar-16ABC123520-1
Mar-16ABC123605
Mar-16ABC123703
Mar-16ABC123819
Apr-16ABC12391-1
Apr-16ABC124053
Apr-16ABC1241-11
Apr-16ABC124220

 

For each material I need to check if either of the 2 Metrics are negative, if yes I need to exclude that material from aggregation (aggregation at calmonth level). So my final aggregation should look like

 

 

CalmonthCores - ReturnedCores - Not Returned
Mar-16117
Apr-1673

 

 

I have tried below approach:

created 2 new variables as below:

 

1.Sum(If((([Cores - Returned]>=0) And ([Cores - Not Returned]>=0));[Cores - Not Returned];0))ForEach([calmonth;plant;material])

2.Sum(If((([Cores - Returned]>=0) And ([Cores - Not Returned]>=0));[Cores - Returned];0))ForEach([calmonth;plant;material])


Below is the output for above 2 variables along with my original metrics


 

CalmonthPlantMaterial - KeyCores - ReturnedCores - Not ReturnedCores - Returned (New)Cores - Not Returned (new)
Mar-16ABC1234-335700
Mar-16ABC123520-100
Mar-16ABC12360505
Mar-16ABC12370303
Mar-16ABC12381919
Apr-16ABC12391-100
Apr-16ABC12405353
Apr-16ABC1241-1100
Apr-16ABC12422020


and I tried to aggregate these 2 variables at calmonth assuming that it will calculate before aggregation (nullifying materials with negative metrics and then aggregate) But it is not working. below is what I got :

CalmonthCores - ReturnedCores - Not Returned
Mar-16-1273
Apr-1673

 

 

So I think calculation (of variables) is happening after aggregation even though I used for each.

 

 

Please let me know if my understanding of context aggregation is wrong and also if there is any way to achieve this requirement. Thanks in advance.

 

Regards,

Aditya


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>