MinX in a table

I must laugh a little at myself here as I had my sign the wrong way ([Sales RT PCT] > 0.8) - otherwise I would’ve gotten back sooner. :laughing:

The below code will give you what you need.

VAR vCustomers =
    ADDCOLUMNS(
        SUMMARIZE( 'CPP POS', GROWER[CRM_PARENT_GROWER_MASTER_KEY] ),
        "@Total Sales", [Total Sales],
        "@Sales RT PCT", [Sales RT PCT]
    )
RETURN
    MINX( FILTER( vCustomers, [@Sales RT PCT] < 0.8 ), [@Total Sales] )

2 Likes