Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Wondering how to do something as follows:
Order # | Error
Order 1 | Something
Order 1 | Something else
Order 2 | null
Order 3 | Something
I want a column or a table that says something like this:
Order # | Error Count
Order 1 | 2
Order 2 | 0
Order 3 | 1
Any ideas?
Solved! Go to Solution.
You can use "Group By" in the query editor.
In order to create base code, you can choose to sum the "Error" column and then adjust the generated code to the code below.
let
Source = Input,
#"Grouped Rows" = Table.Group(Source, {"Order #"}, {{"Error Count", each List.NonNullCount([Error]), Int64.Type}})
in
#"Grouped Rows"
I tried to do that, but it wouldn't let me. That is because the error column is text, so it is not letting me use the sum operator
Ah, forgot to tell. Sure you will get errors at first, just ignore these and adjust the code, then you'll be fine.
Like this:
Wow, thank you so much, this was really helpful.
One last question. I want to either append this column to the original table, or create a new table without altering the first table. How do I do this?
Just save & load the query with a new name, then you'll have your new table.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 35 | |
| 34 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 136 | |
| 102 | |
| 68 | |
| 66 | |
| 58 |