# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$300 before February 6: REGISTER NOW!
cancel
Showing results for
Did you mean:
Contributor III

## FirstSortedValue()

I have the following table:

I want to create another table that will only have the circled row.

I have Customer for my dimension. My minimum unit price by customer is: =Aggr(Min(UnitPrice), Customer)  which gives me:

How do I add the Product and UnitSales to this table and how do I get the FirstSortedValue so that I only get the Customer, Product, UnitSales and UnitPrice for that one row?

Labels (1)
• ### FirstSortedValue

1 Solution

Accepted Solutions
Champion III
Did you try like in your expression

=Firstsortedvalue(Product, Aggr(Min(UnitPrice), Customer)
=Firstsortedvalue(UnitSales, Aggr(Min(UnitPrice), Customer)
=Firstsortedvalue(UnitPrice, Aggr(Min(UnitPrice), Customer)
4 Replies
Partner - Master III

Why dont you sent a limit on the dimension to show bottom 1 value

Master II

Try the below

I have wriiten the expression such that it will fetch the row that has lowest unitprice

`min({<Customer={"=min(UnitPrice)=min( TOTAL  aggr( min(UnitPrice),Customer))"}>}UnitPrice)`

The expression could be simpler i guess.

Learning never stops.
Champion III
Did you try like in your expression

=Firstsortedvalue(Product, Aggr(Min(UnitPrice), Customer)
=Firstsortedvalue(UnitSales, Aggr(Min(UnitPrice), Customer)
=Firstsortedvalue(UnitPrice, Aggr(Min(UnitPrice), Customer)
Contributor III
Author
Thank you Vishsaggi.
Tags
Community Browser