Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
I currently have the following data set and wanted to create a table which would display information about each column, such as the number of null values and the number of duplicate values.
Data:
I have created a Query which gets me the Null values, but cannot figure out how to display or calculate the number of duplicate values in each column.
Query:
Is there a way in which i can count the duplicate values for each column so it can be displayed in a table similar to the one in query? Would ideally like to have another column called "DuplicateCount".
Thanks!
Hi @Anonymous
1.Add an index column in the Query Editor.
2.Add a calculated column with this formula.
Column =CALCULATE ( COUNT ( Table[Column] ), Table[Index] <= EARLIER ( Table[Index] ) )
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You know that this functionality is built into Power Query Editor, right? View...Column Quality.
If you must do it yourself you can compare the row count to the distinct count, or create a grouping by value and count the number of occurrences for each value.
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |