Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Finding the min of two values

Hi all,

I have two expressions - 'material cost' and 'item cost' which are being used for pricing analysis.

I wish to create a table which shows both values, but create an extra column which summarises the two values by returning the

smaller value.

Material CostItem CostMin of Material & Item
5.504.994.99
2.502.002.00


How do I need to write this expression? Can I use MIN...?

Many thanks,

Paul

3 Replies
MayilVahanan

Hi

Try like this

=RangeMin(column(1),Column(2))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
CELAMBARASAN
Partner - Champion
Partner - Champion

You have to use RangeMin here

RangeMin([Material Cost], [Item Cost])

kangaroomac
Partner - Creator II
Partner - Creator II

Alternatively, if you would like to use the calculated field in many different places, in your load script have something like:

LOAD

     MaterialCost,

     ItemCost,

     IF(MaterialCost < ItemCost, MaterialCost, ItemCost) AS LowerOrSameAsValue,

     ...