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

A 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.

Reply
HamidBee
Power Participant
Power Participant

SQL Syntax incorrect when using DISTINCT -PowerBI Report Builder

I am using Power BI Report Builder. I am querying data being held in SSMS. My SQL syntax seems to be incorrect when I use DISTINCT:

 

SELECT

  [Sheet1$].ID

  ,[Sheet1$].Player

  ,DISTINCT([Sheet1$].Nationality)

FROM

  [Sheet1$]

Any ideas as to why this is?

1 ACCEPTED SOLUTION
HamidBee
Power Participant
Power Participant

I realised that DISTINCT should come directly after the SELECT statement inorder for it to work.

SELECT

  DISTINCT [Sheet1$].Nationality,

  [Sheet1$].ID,

  [Sheet1$].Player

FROM

  [Sheet1$]

 

View solution in original post

1 REPLY 1
HamidBee
Power Participant
Power Participant

I realised that DISTINCT should come directly after the SELECT statement inorder for it to work.

SELECT

  DISTINCT [Sheet1$].Nationality,

  [Sheet1$].ID,

  [Sheet1$].Player

FROM

  [Sheet1$]

 

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.