Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to evaluate the max value

Hi All,

i have a table which contains 2 columns (Product, Sales)

i want to make a straight table which show each product and its Sales(clear till now) and a third column shows the sales of the product divided by the max value of sales even it's + or -

ProductSales
x1000
y-3000
z2500

as cleared above the max value of sales is 3000 so i want the third column to be

ProductNew Value
x1000/3000
y-3000/3000
z2500/3000

but note that i'm writing set expression to get the sales it's not static value

how to make the new value??

1 Solution

Accepted Solutions
luciancotea
Specialist
Specialist

=SUM( Sales ) / MAX( TOTAL fabs( aggr( SUM( Sales ), Product )))

View solution in original post

4 Replies
Not applicable
Author

Hi Mona

an easy way is to store in a variable max(Sales)  (gives max from selected records)

and use it to divide in your expression as Sum(Sales)/$(var)

best regards

Chris

luciancotea
Specialist
Specialist

=SUM( Sales ) / MAX( TOTAL fabs( aggr( SUM( Sales ), Product )))

Not applicable
Author

it's not working

tresesco
MVP
MVP

Try :

=Sum(Sales)/ Max( total fabs(Sales))

PFA