Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
vikrammankar
Frequent Visitor

How to get distinct or unique value from a table using a measure

Hi,

 

I have below table 

 

T

ENAMESNAMENOWD
JohnAlex20
JohnAlex20
JohnAlex20

 

In Microsoft Access when I write query SELECT DISTINCT(NOWD), sname FROM T;

I get below output:

NOWDSNAME
20Alex

 

How do I do the same in Power BI by writing a measure

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @vikrammankar ,

 

I suggest you to create a table visual by "Don't summarize" function in [NOWD] column in Value Field.

My Sample:

RicoZhou_0-1653446914180.png

Result is as below.

RicoZhou_1-1653446936975.png

Or you can create a calculated table with distinct (NOWD and SNAME).

Distinct Table = 
SUMMARIZE('Table','Table'[SNAME],'Table'[NOWD])

Result is as below.

RicoZhou_2-1653447030174.png

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @vikrammankar ,

 

I suggest you to create a table visual by "Don't summarize" function in [NOWD] column in Value Field.

My Sample:

RicoZhou_0-1653446914180.png

Result is as below.

RicoZhou_1-1653446936975.png

Or you can create a calculated table with distinct (NOWD and SNAME).

Distinct Table = 
SUMMARIZE('Table','Table'[SNAME],'Table'[NOWD])

Result is as below.

RicoZhou_2-1653447030174.png

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

jcalheir
Solution Supplier
Solution Supplier

Hi

 

In DAX you have the similar function DISTINCT

 

Please check this microsoft article bellow to see some examples.

https://docs.microsoft.com/pt-pt/dax/distinct-table-function-dax

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.