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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello everyone, I need to do in power query the choice of min value in a column (value) and return the corresponding description but I'm not getting it,
thank you all for the help
let
Fonte = Excel.Workbook(File.Contents("C:\Users\m071410\Downloads\teste19-09.xlsx"), null, true),
Tabela1_Table = Fonte{[Item="Tabela1",Kind="Table"]}[Data],
#"Tipo Alterado" = Table.TransformColumnTypes(Tabela1_Table,{{"CONTRATO", type text}, {"HORAS", type text}, {"DATA", Int64.Type}}),
#"Colunas Renomeadas" = Table.RenameColumns(#"Tipo Alterado",{{"DATA", "VALUE"}, {"HORAS", "DESCRIPTION"}, {"CONTRATO", "CONTRACT"}}),
#"Linhas Agrupadas" = Table.Group(#"Colunas Renomeadas", {"CONTRACT"}, {{"VALUE", each List.Min([VALUE]), type nullable number}, {"table", each _, type table [CONTRACT=nullable text, DESCRIPTION=nullable text, VALUE=nullable number]}})
in
#"Linhas Agrupadas"
Solved! Go to Solution.
Hi @Spotto,
I think you are following this one:
Solved: Select rows on minimum value in Power Query - Microsoft Power BI Community
What you nee dto do next is expanding the table column and thne filter on [VALUE] = [MinVALUE].
Cheers,
John
Hi @Spotto
Try this
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("RY4xDgAhCAT/Ym2l3vUYCPVpYWH8/zdkORMp2GXCEuYMRCFaI9eUU1jxQLZS01weh7XaIDKA8iWd1JNOmHFNWEnMnKDAy/isvz9RkKbasFTKZZ0Ea3hjbQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CONTRACT = _t, DESCRIPTION = _t, VALUE = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"CONTRACT", type text}, {"DESCRIPTION", type text}, {"VALUE", Int64.Type}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"CONTRACT"}, {{"All Data", each _, type table [CONTRACT=nullable text, DESCRIPTION=nullable text, VALUE=nullable number]}, {"Min Value", each List.Min([VALUE]), type nullable number}}),
#"Expanded All Data" = Table.ExpandTableColumn(#"Grouped Rows", "All Data", {"DESCRIPTION", "VALUE"}, {"DESCRIPTION", "VALUE"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded All Data", each [VALUE] = [Min Value]),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Min Value"})
in
#"Removed Columns"
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @Spotto
Try this
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("RY4xDgAhCAT/Ym2l3vUYCPVpYWH8/zdkORMp2GXCEuYMRCFaI9eUU1jxQLZS01weh7XaIDKA8iWd1JNOmHFNWEnMnKDAy/isvz9RkKbasFTKZZ0Ea3hjbQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CONTRACT = _t, DESCRIPTION = _t, VALUE = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"CONTRACT", type text}, {"DESCRIPTION", type text}, {"VALUE", Int64.Type}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"CONTRACT"}, {{"All Data", each _, type table [CONTRACT=nullable text, DESCRIPTION=nullable text, VALUE=nullable number]}, {"Min Value", each List.Min([VALUE]), type nullable number}}),
#"Expanded All Data" = Table.ExpandTableColumn(#"Grouped Rows", "All Data", {"DESCRIPTION", "VALUE"}, {"DESCRIPTION", "VALUE"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded All Data", each [VALUE] = [Min Value]),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Min Value"})
in
#"Removed Columns"
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @Spotto,
I think you are following this one:
Solved: Select rows on minimum value in Power Query - Microsoft Power BI Community
What you nee dto do next is expanding the table column and thne filter on [VALUE] = [MinVALUE].
Cheers,
John
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.