- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Table organisation and row elimination
Hi everyone I have the next data :
JON | 0 |
MAR | 1 |
JUAN | 0 |
ALF | 1 |
ALF | 1 |
PEP | 0 |
PEP | 0 |
VA | 0 |
VA | 0 |
PA | 0 |
PA | 1 |
CTA | 1 |
CTA | 1 |
AR | 0 |
NSA | 1 |
NSA | 1 |
I would like to do the next things: eliminate rows with 0 and eliminate rows that have a repeated name, I´ve tried many ways in different order. However, I don´t have a effective way, I would be please if some helped me to solve this problem.
Thanks for reading
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8vL3U9JRMlCK1YlW8nUMArINwWyvUEeEhKOPG1wCmR3gGgBXg8wOc8TGDEBjQsxwDsHOBrsFotovGCEMZ8cCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Item = _t, Value = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Item", type text}, {"Value", Int64.Type}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Value] <> 0)),
#"Removed Duplicates" = Table.Distinct(#"Filtered Rows", {"Item"})
in
#"Removed Duplicates"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the Source step with your own source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8vL3U9JRMlCK1YlW8nUMArINwWyvUEeEhKOPG1wCmR3gGgBXg8wOc8TGDEBjQsxwDsHOBrsFotovGCEMZ8cCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Item = _t, Value = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Item", type text}, {"Value", Int64.Type}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([Value] <> 0)),
#"Removed Duplicates" = Table.Distinct(#"Filtered Rows", {"Item"})
in
#"Removed Duplicates"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the Source step with your own source.

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
06-24-2024 06:51 PM | |||
06-27-2024 11:34 AM | |||
07-25-2024 06:03 AM | |||
06-26-2024 11:22 AM | |||
04-16-2024 03:09 AM |
User | Count |
---|---|
27 | |
15 | |
11 | |
8 | |
8 |
User | Count |
---|---|
20 | |
16 | |
15 | |
15 | |
14 |