Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello, is it possible to set up filter in M so table only shows max value in 'year' column? If so, please can you show code for this? I would like to filter my table to only show max value in 'year' column. This is my code so far...
let
Source = x_optional,
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", Int64.Type}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Year", "year"}})
in
#"Renamed Columns"
Thanks
Solved! Go to Solution.
Try this , you need to streamline column names and previous step names
let
Source = x_optional,
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", Int64.Type}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Year", "year"}})
#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each ([year] = List.Max(#"Renamed Columns"[year])))
in
#"Filtered Rows"
Proud to be a Super User!
IF it is working you need not worry about column names .
Proud to be a Super User!
Try this , you need to streamline column names and previous step names
let
Source = x_optional,
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", Int64.Type}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Year", "year"}})
#"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each ([year] = List.Max(#"Renamed Columns"[year])))
in
#"Filtered Rows"
Proud to be a Super User!
Thank you @VijayP , that worked. not sure though what you mean re streamline column names and previous step names?
User | Count |
---|---|
86 | |
82 | |
68 | |
65 | |
55 |
User | Count |
---|---|
123 | |
100 | |
90 | |
83 | |
66 |