New to Qlik Analytics

If you’re new to Qlik Cloud or Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!

Who Me Too'd this topic

piter89
Contributor II
Contributor II

How to compute the max value for dimension in a column and add it to all rows

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 

Labels (1)
Who Me Too'd this topic