Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |