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: 
Anonymous
Not applicable

Column in set analysis

Hello,

I'm from Brazil and I do not speak English , I'm using google translator to send this message . I'm having trouble using a value that is in another column set analysis , the Mx column I have the Year Month the last sale for each customer and product, I needed to return the sum of sales for each customer and product according to the year month in this column mx , I've tried a number of ways but I can not make that calculation , I have read that would have to use a sum ( if ( ) ) but it does not know how to do this in this case. Anyone know how to solve ess problem?


The file is attached .

1 Solution

Accepted Solutions
sunny_talwar

How about this?

FirstSortedValue(Aggr(Sum(Valor), AnoMes, Cliente), -Aggr(AnoMes, AnoMes, Cliente))


Capture.PNG

View solution in original post

4 Replies
sunny_talwar

Is this what you want?

Capture.PNG

Expression:

FirstSortedValue(Valor, -AnoMes)

Anonymous
Not applicable
Author

Sunny ,

Thanks for answering.


I ended up putting the wrong example, I need it to be returned the sum of every month year sales maximum of each product and customer , in this example attached put another sale in 201607 and 201501 but the returned results are incorrect .

sunny_talwar

How about this?

FirstSortedValue(Aggr(Sum(Valor), AnoMes, Cliente), -Aggr(AnoMes, AnoMes, Cliente))


Capture.PNG

Anonymous
Not applicable
Author

It was just that , thank you.