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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Pan_Forex
Helper III
Helper III

Least value for and if

Hello! I am trying to write a function that will return the smallest value from another column if there is one condition. I have 3 columns [seller], [minute] and [value]. I would like to find, for each vendor, the smallest value of [minute] if [value] is equal to 0 and never again later takes a value other than 0. 

SellerMinuteValueMeasure
Seller A    1               10 2
Seller B103
Seller C101
Seller A202
Seller C201
Seller B243
Seller A302
Seller B303
Seller C301
Seller A402
Seller B403
Seller C401


In the above case, the new column measure should look like this: Seller A: minute = 2, Seller B: minute = 3, Seller C: minute = 1

2 REPLIES 2
FreemanZ
Super User
Super User

hi @Pan_Forex ,

 

not sure if i fully get you, try to plot a table visual with seller column and a measure like:

measure = 
MAXX(
    FILTER(data, data[value]<>0),
    data[Minute]
)+1

 

it worked like:

FreemanZ_0-1700057301235.png

Thank you for your reply. I forgot to add that this should be a feature of the new column. This should look for the smallest minute value for each seller. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.