Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Minimum across column

Hi all,

 

I have a table in visualization as below:

 

CustomerSalesQuantityAvg SalesDiscountNet SalesSales catQuantity catNet Sales catCustomer category
A4000202001539850100
B300056001029901311
C1000254059952020
D500105014993232

 

*Net Sales = Sales - Discount (Discount is from other table)

Sales cat, Quantity cat and Net Sales cat are based from Sales, Quantity and Net Sales value.

What I want is to get the Customer category. Customer category is based on the minimum among Sales cat, Quantity cat and Net Sales cat.

1 ACCEPTED SOLUTION

@Anonymous

 

Try this

 

Customer Category =
MIN (
    MIN ( SELECTEDVALUE ( [Quantity Cat] ), SELECTEDVALUE ( [Sales Cat] ) ),
    [Net Sales Cat]
)

View solution in original post

7 REPLIES 7
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

What if you use Min Function as Measure

 

 

Customer Category =
MIN ( [Quantity Cat], [Sales Cat] )
Anonymous
Not applicable

Sorry, @Zubair_Muhammad I have left out one more element, which customer category is based on the minimum of sales cat, quantity cat and net sales cat.

 

I have tried the MIN in measure. But I have an error message 'A single value for column 'net sales cat' in table A cannot be determined.

 

@Anonymous

 

Are  " sales cat, quantity cat and net sales cat"  measures or calculated columns?

 

MIN allows only 2 arguments..so you can wrap a MIN function inside another MIN

 

Customer Category = MIN(MIN([Quantity Cat],[Sales Cat]),[Net Sales Cat])

See the attached sample file

Anonymous
Not applicable

@Zubair_Muhammad,

 

I can't do that because sales cat, quantity cat and net sales cat are from different table.

Anonymous
Not applicable

@Zubair_Muhammadsales cat and quantity cat are new column while net sales cat is new measure.

@Anonymous

 

Try this

 

Customer Category =
MIN (
    MIN ( SELECTEDVALUE ( [Quantity Cat] ), SELECTEDVALUE ( [Sales Cat] ) ),
    [Net Sales Cat]
)
Anonymous
Not applicable

@Zubair_Muhammad

Got it, Thanks

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors