Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If you’re new to Qlik Cloud or Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
Hello,
I have a table with products. The Product field is dimension in the table.
Product //dimension | Max value //1. measure | Amount //2. measure |
Backpack | 5 | 5 |
Pen | 1 | 1 |
Chalk | 4 | 4 |
Two measure as follows:
1.
Max(Aggr( Sum({< YearMonth={'$(= $(vMaxMonth))'}, [Product] >} total<[Product]> [Amount]),Product)) // bad result in table, good result in KPI
2.
Sum({< YearMonth={'$(= $(vMaxMonth))'} >}[Amount])
I would like to get the table as bellow:
Product //dimension | Max value //1. measure | Amount //2. measure |
Backpack | 5 | 5 |
Pen | 5 | 1 |
Chalk | 5 | 4 |
The 'max value' column should show the higher value for any product in amount measure. I tried to use FirstSortedValue function, but it also failed.
FirstSortedValue(Product, Aggr(Max({< [YearMonth]={'$(= $(vMaxMonth))'}, [Product] >}[Amount]), Product))
Thank you for your help