Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Please, I need support to aggr function

Hi,

I'm using the aggr function and I don't know if I'm right.

My problem is that I have a table with lines (linea) and profiles (perfil) with their manufacturing forecast (Sum1), but I must divide the forecast between the number of lines of the same profile. I use the aggr function to obtain the number of lines of every profile, but this number only appears in the first row that the profile appears. I need to obtain this number every time.

For example:

Sin título.png

I need that  number 4 repeats at lines L3, L4 i L5 to divide 180 every row of MB1881XT profile.

Thanks for your help.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I think this might work as well, without aggr() function needed:

= count(total<Perfil> distinct Linea)

View solution in original post

3 Replies
swuehl
MVP
MVP

Try a NODISTINCT qualifier

aggr(NODISTINCT count(distinct Linea), Perfil)

Hope this will help you

Stefan

swuehl
MVP
MVP

I think this might work as well, without aggr() function needed:

= count(total<Perfil> distinct Linea)

Not applicable
Author

Your answers are correct (and really fast). Thank you very much!!!