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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
villa1980
Resolver II
Resolver II

Min and All except in Power Query

Hi All,

 

 I am trying to replicate a DAX expression within Power Query which I can then use to filter the underlying data, however, when trying to replicate it within Power Query I am getting blanks when should be returning values.

Is something very simple I am not doing in Power Query, but any help would be good

 

DAX Expression

Min_Index = CALCULATE(
    MIN(Sheet1[Index]), ALLEXCEPT(Sheet1,Sheet1[Combination])
    )
 
POWER QUERY
List.Min([Index],[Combination])

Many Thanks
 
Alex
1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

NewStep=let a=Table.Group(YourTable,"Combination",{"min",each List.Min([Index])}) in Table.AddColumn(YourTable,"MinIndex",each a{[Combination=[Combination]]}[min])

View solution in original post

4 REPLIES 4
wdx223_Daniel
Super User
Super User

NewStep=let a=Table.Group(YourTable,"Combination",{"min",each List.Min([Index])}) in Table.AddColumn(YourTable,"MinIndex",each a{[Combination=[Combination]]}[min])

Hi wdx223_Daniel,
Thanks for the reply, wow that is quite complicated compared to DAX 🙂

I have added the column with your formula but unfortunately still comes back blank. I have included the screenshot below to show it.

So as you can see I have many lines for 2 entities in the Combinations Column, would like it to say 1 as the Min Index

villa1980_0-1720776490549.png

 

could you please show your hard code?

Hi @villa1980 

 

To resolve the issue, share your implementation of the provided solution by @wdx223_Daniel and make sure that code section includes at least the previous and next step as well

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.