Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
idogridish2
Creator III
Creator III

count customer that paid the minimum price

Hi,

how can i count in the layout the number of customer that paid the minimum price in each company?

i added a sample data/

my culc is wrong in the sample.

thanks.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

With a selection in company, you can make it work using

=Count({$<Customer={"=PRICE=min(TOTAL PRICE)"}>}Customer)

But I guess you want have this expression consider the dimensional value of company, potentially for all companies.

Without a change to the script, you can use

=Sum( Aggr( If(PRICE = Min(TOTAL<Company> PRICE), 1), Company, Customer))

View solution in original post

3 Replies
swuehl
MVP
MVP

With a selection in company, you can make it work using

=Count({$<Customer={"=PRICE=min(TOTAL PRICE)"}>}Customer)

But I guess you want have this expression consider the dimensional value of company, potentially for all companies.

Without a change to the script, you can use

=Sum( Aggr( If(PRICE = Min(TOTAL<Company> PRICE), 1), Company, Customer))

sunilkumarqv
Specialist II
Specialist II

Please try this

Count (Distinct aggr(Min(Total PRICE),Customer))


tyagishaila
Specialist
Specialist

Sum({$<PRICE={"$(=$(vMinPrice))"}>}Customer)

where variable

vMinPrice=Min(PRICE)