Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
I created a textbox which returns me the max price of my products
this is my database
Product | Price |
---|---|
A | 1000 |
B | 500 |
C | 100 |
D | 1000 |
E | 1000 |
F | 600 |
G | 1000 |
H | 1000 |
I | 1000 |
this is my expression:
='Max Price ' & '\n' &
Concat(DISTINCT {<Product = {"=Aggr(max(Price), Product) = Max(TOTAL Aggr(max(Price), Product))"}>} Product, ', ') & ' ...' & '\n '
& money(Max(TOTAL Aggr(Max([Price]),Product )))
QV returns me:
Product | Price |
---|---|
A | 1000 |
D | 1000 |
E | 1000 |
G | 1000 |
H | 1000 |
I | 1000 |
This is definetly correct.
But what I want is, that QV should return me max 3 values. Something like:
A = 1000
D = 1000
E = 1000 etc. ...
is this possible?
You can try this:
='Max Price ' & '\n' &
FirstSortedValue(Product, -Aggr(Max(Price), Product) + Ord(Left(Product, 1))) & ' ,' &
FirstSortedValue(Product, -Aggr(Max(Price), Product) + Ord(Left(Product, 1)), 2) & ' ,' &
FirstSortedValue(Product, -Aggr(Max(Price), Product) + Ord(Left(Product, 1)), 3) & ' ,'
& ' ...' & '\n '
& money(Max(TOTAL Aggr(Max([Price]),Product )))
Max 3 values? Not sure I understand completely?
try this
=Max(field,3)
what condition you want to follow as 6 products have proce of 1000?
by alphabetic?
did you look at tab dimension Limits?
Hi:
Open the properties window of your straight table and set up this dimension limits
Hope it helps
Joaquín
I didnt create the expression in a chart. I use this expression in the textbox.
nevertheless look at source data
create tablebox or listboxes to checkthe origin data
or provide a sample qvw so we can have a look into
I attached a qvw file !
3 largest product in alphabetic order would be great
Here you have it
Sry maybe i didnt explain my problem correctly
QV should return Max Price = 1000 and the correspondending products (3, not all) = A, D, E ...