Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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.

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

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

= count(total<Perfil> distinct Linea)

View solution in original post

3 Replies
swuehl
Champion III
Champion III

Try a NODISTINCT qualifier

aggr(NODISTINCT count(distinct Linea), Perfil)

Hope this will help you

Stefan

swuehl
Champion III
Champion III

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!!!