This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I am a bit perplexed by how DAX is reporting distinct values for a column. I have a list of patients, and grouped them in PowerQuery to get a count of duplicate names. Using Table.Group should be perfectly sufficient to distinguish distinct values. e.g.
let source = Patients
in Table.Group(Source, {"Full Name"}, {{"Count", each Table.RowCount(_), Int64.Type}})
However PBI desktop is asserting that there are duplicate values in "Full Name".
I tried a bunch of things, like eliminating spaces, and even re-asserting using Distinct. However, the discrepancy persists e.g.
let
Source = Patients,
#"Trimmed Text" = Table.TransformColumns(Source, {{"Full Name", Text.Trim, type text}}),
#"Grouped Rows" = Table.Group(#"Trimmed Text", {"Full Name"}, {{"Count", each Table.RowCount(_), type number}}),
#"Sorted Rows" = Table.Buffer(Table.Sort(#"Grouped Rows", {{"Count", Order.Descending}, {"Full Name", Order.Ascending}})),
Counts = { Table.RowCount(#"Sorted Rows"), Table.RowCount(#"Removed Duplicates") },
#"Removed Duplicates" = Table.Distinct(#"Sorted Rows", {"Full Name"})
in
#"Removed Duplicates"
So PowerQuery shows 22592 rows before and after call to Distinct. Yet desktop (see status bar at bottom) shows 13 duplicate values.
I have to hide the names below, but I can tell you that if I filter on the table in power query using one of the names like CANDACE that there is only a single entry in the table when in the query editor, although 2 appear after loaded in the desktop.
Solved! Go to Solution.
@hansei have you made sure they are all the same case? power query sees difference cases as unique, but dax doesn't. Change them all to upper or lower case
Proud to be a Super User!
@hansei have you made sure they are all the same case? power query sees difference cases as unique, but dax doesn't. Change them all to upper or lower case
Proud to be a Super User!
Thanks for that @vanessafvg . For some reason, everything was the same case when viewed in the desktop Data tab, so that was not occurring to me.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 29 | |
| 26 | |
| 25 | |
| 22 | |
| 13 |
| User | Count |
|---|---|
| 59 | |
| 50 | |
| 26 | |
| 20 | |
| 19 |