Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello community,
i need to know how i can give out the max/min from a column.
example
Product | Cost |
---|---|
A | 100 |
B | 200 |
C | 300 |
D | 400 |
E | 500 |
If i choose product D it should compare the Cost of product D (400) with the other product's cost and finaly give out the minimum cost which is 100. something like this:
if Product D = 400 -> compare cost with other products -> give out min cost
could anyone please help me out here?
i know that there s an expression for max/min like max(Cost), but it does not make the comparison which i want to see.
try using total
min(total Cost)
it does not work. it still gives me out D 400 if i select product d.
in fact it should work like this
i select from the product list - Product D
in the first chart it should give me out - Cost=400
in the second chart it should compare the cost of product D with the other costs and give me out the lowest cost - min cost=100
it gives me out product D's cost = 400 and min(cost)=400 if i select product D in my list
May be this:
Min({<Product = >} TOTAL Cost)
it works! thank you very much!!
If it's correct, close the post and assing the correct answer to the user who help you
I still have another question.
now it gives me out correctly the min(Cost)=100. but can i combine it with another expression which gives me the product name of min(cost)=100
sth like this:
i select product d, Cost product D=400 , give me out min cost with the expression Min({<Product = >} TOTAL Cost) , and now give me out the referring product to the min(cost) which is product A in this excample.
Try this:
=Only({<Product = >} If(Cost = Min({<Product = >} TOTAL Cost), Product)
=Only(TOTAL{<Product = >} If(Cost = Min({<Product = >} TOTAL Cost), Product)) (Correct expression)
PFA the application also
Best,
Sunny