This field is required.
Only these extensions are allowed(.jpg, .JPG, .jpeg, .JPEG, .gif, .GIF, .png, .PNG)
Tags cannot contain the characters ' /, \\, #, ?, or ; >,< '
Only these extensions are allowed(.zip,.ZIP,.pdf,.PDF,.qvf,.QVF,.qvw,.QVW)
Discussion Board for collaboration related to QlikView App Development.
Hello the community,
I have spend so many hours on my problem that I finally asking for your help. Let me explain
I am using QV12.10 SR8.
For some needs in retail, I have built a pareto using the new great feature in the aggr function to sort my element with an expression.
And that works perfectly to define my Class A,B,C per product (ArticleNo in my case) using this function:
if(rangesum(Above(sum(#SalesQty))/sum(TOTAL #SalesQty), 0, rowno() ))<=0.8, 'A',
if(rangesum(Above(sum(#SalesQty)/sum(TOTAL #SalesQty), 0, rowno() ))<=0.95, 'B',
(_KeyArticleNo, (=sum(#SalesQty), Desc))
However, I have now been asked to do the same thing per product and product group and here comes the problem...
it looks like the sorting doesn't work when I had an extra dimesnion in my aggr function. I tried all combination bu nothing works.
if(rangesum(Above(sum(#SalesQty)/sum(TOTAL <ArticleGroup> #SalesQty), 0, rowno() ))<=0.8, 'A',
if(rangesum(Above(sum(#SalesQty)/sum(TOTAL <ArticleGroup> #SalesQty), 0, rowno() ))<=0.95, 'B',
(_KeyArticleNo, (ArticleGroup, (=Sum(#SalesQty), DESC)))
with some picture to illustrate my issue.
My test case is ArticleGroup: A10 - Jacket, Class A
Here is what I currently have:
So 17 for A10, Class A
But here is what I should get according to my other table I have created (that gives too many info):
I should have 14
Attached you will also find the QVW.
Could you please help me? I have no solution anymore...
Thanks a lot!
Try using this
ArticleGroup,(_KeyArticleNo, (=Sum(#SalesQty), DESC))
View solution in original post
Thank you so much. I have spent 4 hours on this....
The syntax for aggr is to me so tricky.
Thank you again!