Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr doesn´t work well with dimensions?

I have this expresion in a simple table with month as dimension:

Stdev(aggr(sum(COIN_IN),LLAVE))

I wanna see all the months at the same time but it just work well when I select a month.

Do I have to add something to the expresion?

Thanks!!

7 Replies
rubenmarin

Hi Alejandra, maybe using TOTAL to ignore dimensions:

Stdev(aggr(sum(TOTAL COIN_IN),LLAVE))


or:

Stdev(TOTAL aggr(sum(TOTAL COIN_IN),LLAVE))

rubenmarin

Or if you want each month with his values, just add month as dimension in aggr:

Stdev(aggr(sum(COIN_IN),MONTHFIELD,LLAVE))

Not applicable
Author

thanks!!! it worked well in that expresion but i added it to this one and doesn´t work:

sum(aggr((Count({<COIN_IN={'>0'}>}TOTAL<Mes>(LLAVE))+1-rank(1-sum({<COIN_IN={'>0'}>}COIN_IN)))*sum({<COIN_IN={'>0'}>}COIN_IN),Mes,LLAVE))

rubenmarin

Hi Alejandra, can you upload a sample to make some tests?

Also please explain what are trying to do, I don't understand that (Count()+1-Rank())*Sum()

The expression works when you select a month?

Not applicable
Author

Im trying to calculate gini coefficient and  show it by month in a table and this is just a part of the formula ,it works well when I select just a month but I need to show them all. Do you speak spanish??

rubenmarin

Yes, I speak spanish, I just kept this in english because is easier for other users to help, but if want to explain something in spanish I can understand.

It's good news if it works for one month but the formula is a bit complicated to fix without a sample to make some tests.

mbelfiore99
Contributor
Contributor

How did you make the GINI coefficient?