Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 |
---|---|
85 | |
82 | |
66 | |
52 | |
48 |
User | Count |
---|---|
100 | |
49 | |
42 | |
39 | |
38 |