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

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

Reply
Smackcat
Helper I
Helper I

Min of a column, when a variable is zero

Hi experts,

 

I have a complex table, but I have summarized it as the following:

 

 

 

SUMMARIZE(Table,Table[Period],"Sales",SUM(Table[Sales_unit]))

 

 

 

So now I have:

 

PeriodSales
2023100
2022100
20210

 

I want a measure, that shows me the [Period] when [Sales] = 0 (in the example, the answer is 2021). I was trying with minx

 

 

 

MINX(FILTER(SUMMARIZE(Table,Table[Period],"Sales_unit",SUM(Table[Sales_unit])),[Sales] = 0),[Period])

 

 

 

But this measure shows me a dynamic range that is not the wanted result 😞

 

Any help is appreciated. Thanks

1 REPLY 1
amitchandak
Super User
Super User

@Smackcat , You should use sales in the sum,

 

MINX(FILTER(SUMMARIZE(Table,Table[Period],"Sales_unit",SUM(Table[sales])),[Sales_unit] = 0),[Period])

 

of you can use all or allselected

 

MINX(FILTER(SUMMARIZE(all(Table) ,Table[Period],"Sales_unit",SUM(Table[sales])),[Sales_unit] = 0),[Period])

 

or

 

MINX(FILTER(SUMMARIZE(allselected(Table) ,Table[Period],"Sales_unit",SUM(Table[sales])),[Sales_unit] = 0),[Period])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.