Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Super Users,
How we can filter or remove null cell crom column while extracting headers from table column in power query
Solved! Go to Solution.
Hi @Amardeep100115 ,
You can use a M-code such as below:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUQKhWJ1oEJ0CYydBxNNgEulIimDMFBg7FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {}, "Attribute", "Value"),
#"Filtered Rows1" = Table.SelectRows(#"Unpivoted Columns", each ([Value] <> "")),
#"Filtered Rows" = Table.SelectRows(#"Filtered Rows1", each ([Value] <> ""))
in
#"Filtered Rows"
Should be able to click on the drop down for the column and remove (filter out) the nulls/blanks.
Thank you!
but it should be dynamically filter in query editor not more adding step. i have date columns where null valued are there and my dataflow is not getting refresh it. hence seeking for help
Hi @Amardeep100115 ,
I‘m a little confused about "dynamical filter" and "no more adding step".
But as for "Remove null cells from columns while extracting the headers",you can go to query editor,then select all the column>click on "unpivot columns":
And you will see:
Finally click on the dropdown botton of column value >unselect "blank":
All the null cells have been removed.
Thanks you @v-kelly-msft
i understand the solution but i am still looking for win m-code, where we can filter null from columns atleast from one column where i have date
Hi @Amardeep100115 ,
You can use a M-code such as below:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUQKhWJ1oEJ0CYydBxNNgEulIimDMFBg7FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {}, "Attribute", "Value"),
#"Filtered Rows1" = Table.SelectRows(#"Unpivoted Columns", each ([Value] <> "")),
#"Filtered Rows" = Table.SelectRows(#"Filtered Rows1", each ([Value] <> ""))
in
#"Filtered Rows"
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |