Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data in sheet like this
products | obtained | total |
p1 | 1200 | 10000 |
p2 | 1000 | 20000 |
p3 | 200 | 30000 |
p1 | 1200 | 10000 |
p2 | 1400 | 20000 |
p3 | 600 | 30000 |
here if i get sum of products then p1 shows 2400 p2=2400 and p3=800 .. so here i get 2400 top value against twp products ..
so i want to get top values in textbox and want like this in textbox
p1 (2400/10000) p2 (2400/20000)
how i do this ?
OK this work properly but WILL you please why you use rank .. and will you please explain your whole query
i unable to understand
I used concat function to concatenate
product, sum of obtained and sum of total.
rank i have used to get only top 2 products...
to learn comprehensive set analysis, enrol my below course on udemy.
https://www.udemy.com/become-an-expert-of-qlik-set-analysis/learn/v4/overview
only top 2 products? what if we have more than 2 then ? we suppose not to do that manually change rank ...
This is your question
so here i get 2400 top value against twp products ..
So I considered you need top 2. Let me know what is the logic you want.. I can suggest new expression accordingly.
means this is not necessary that only two products i gave only example here .. this may be more than 2 also or may be 1 or may be 3 means ..
rest is same only here i try to clear that this is not necessary only two products may be these is 4 products with same values
when you are saying 2 products, 3 products... but what is the logic of showing them on text box..
right now you are showing 2 products out of 3 ... so why you are showing only 2 and not all 3..
what is the logic?
are you showing only those products which are crossing 2400 ???
if yes the use
=Concat({<products = {"=SUM(obtained)>=2400"}>}DISTINCT Aggr(products & ' ' & '(' & SUM(obtained) & '/' & SUM(Distinct total) & ')',products),CHR(10))
want to show those who have highest values .. or if there is 2 or 3 or so on product with same highest values than want to show accordingly
then use this..
=Concat({<products = {"=SUM(obtained) = Max(TOTAL Aggr(SUM(obtained),products))"}>}DISTINCT Aggr(products & ' ' & '(' & SUM(obtained) & '/' & SUM(Distinct total) & ')',products),CHR(10))
thanks so much
you can also use
=Concat({<products = {"=Rank(SUM(obtained),1,1)=1"}>}DISTINCT Aggr(products & ' ' & '(' & SUM(obtained) & '/' & SUM(Distinct total) & ')',products),CHR(10))