Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 -
Product | Sales |
---|---|
x | 1000 |
y | -3000 |
z | 2500 |
as cleared above the max value of sales is 3000 so i want the third column to be
Product | New Value |
---|---|
x | 1000/3000 |
y | -3000/3000 |
z | 2500/3000 |
but note that i'm writing set expression to get the sales it's not static value
how to make the new value??
=SUM( Sales ) / MAX( TOTAL fabs( aggr( SUM( Sales ), Product )))
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
=SUM( Sales ) / MAX( TOTAL fabs( aggr( SUM( Sales ), Product )))
it's not working
Try :
=Sum(Sales)/ Max( total fabs(Sales))
PFA