Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Show Minimum value

Hi guys,

My first post which i am hoping you can help with !

Basically i have a table which returns the following Screenshot.jpg

What i am trying to do is return just the lowest value within the customer price.  This has been setup as an expression so hoping that this is possible?

Any help would be greatly appreciated.

Thanks!

Mel

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

What if you try :

     min ( Price-"Discount Amount")

View solution in original post

10 Replies
MK_QSL
MVP
MVP

Provide sample data please!

Anonymous
Not applicable
Author

Simply this could be what you are after :

     Min ( [YourCustomerPriceExpression] )

If then could you share the expression and clarify.

Anonymous
Not applicable
Author

Sorry I thought the screenshot would suffice!

Here's the expression which is calculating the customer price

=Price-"Discount Amount"

Discount Amount is another expression.. Not sure if this helps?

Anonymous
Not applicable
Author

What if you try :

     min ( Price-"Discount Amount")

Anonymous
Not applicable
Author

Unfortunately that just changes the values to "-" within the customer price

Capture.JPG.jpg

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Assuming the customer price is calculated, then something like:

=Min(Aggr(Price * (1 - discount_perc), Price))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Hi Jon

unfortunately that has still returned "-" within the column..

JonnyPoole
Former Employee
Former Employee

To return the minimum price in the whole chart and repeat that value on each row use the TOTAL clause in the aggregation function (this case its min):

min(  Total   [Customer Price] )

If you want the minimum amongst other dimensional values (subtotal) add the dimension value like this

min(  Total  <dimension>   [Customer Price] )

However, if your [Customer Price] is actually an expression instead of just a field, the syntax will change. What is the expression for [Customer Price] ?

Anonymous
Not applicable
Author

Hi there,

The expression which I am using to get the Customer Price is quite simple..  It just the price column minus the discount amount.

Expression for discount amount is - =((Price/100)*discount_perc)

Customer Price - =Price-"Discount Amount"

Thanks