Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I was wondering if someone can help
I have a model set up using direct query.
I have two column each have duplicates I want to be able to create a measure that would count only unique rows from BOTH columns
For Example:
Column A Column B
1 A
2 B
3 C
4 D
1 A
4 E
3 C
I was be expecting a total of 5 unique rows (what I want the measure to show).
As I have 2 rows that are Column A: 1 and Column B: A (should only count one row)
I also have two rows that are Column A: 3 and Column B: C (should only count one row)
I also have two other rows:
Is there any way to achieve this?
Thanks in advance,
Boycie92
Solved! Go to Solution.
MEASURE = COUNTROWS ( DISTINCT ( Table_Name ) )
Hi @Boycie92,
After test, the measure formula @Zubair_Muhammad posted is right. You can create a card visual to show the result.
Please mark the right reply as answer, so more people will find workaround easily and clearly.
Best Regards,
Angelia
You could combine 2 columns into a new column:
Combine = COMBINEVALUES("_", Table[ColumnA], Table[ColumnB])
And then do a distinct count on the new column:
Unique rows = DISTINCTCOUNT(Table[Combine])
MEASURE = COUNTROWS ( DISTINCT ( Table_Name ) )
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
62 | |
61 | |
55 | |
38 | |
27 |
User | Count |
---|---|
83 | |
61 | |
45 | |
41 | |
39 |