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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
clint_powell
Frequent Visitor

Error when using Distinct Function: A table of multiple values was supplied where a single value was

New user here trying to navigate unexpected results. I have a fact table that has multiple entries for repeating data points (email addresses). The same email address is listed multiple times within the same column.

 

I am trying to create a new column in a new table using the DISTINCT function, but I am recieving the error mentioned above. 

 

The goal is to populate the new column in the new table with ONLY a list of the unique email addresses that are present in the fact table. 

 

It was my assumption that DISTINCT was a fairly straightforward solution, but that does not appear to be the case. Any tips?

2 ACCEPTED SOLUTIONS
Dangar332
Super User
Super User

hi, @clint_powell 

use all() function it give unique value of column

like below

all(tablename[columnname])

View solution in original post

Hi, @clint_powell 

 

Syntax error for all() function

 

See my code properly

You miss  ) to finish all() function

 

filter(

  all(tablename[columnname]),

 tablename[columnname]<>blank()

)

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.and don't forgot to give kudos.

View solution in original post

6 REPLIES 6
clint_powell
Frequent Visitor

Thanks so much for the quick responses! But, I'm still getting an error, see below:

clint_powell_0-1704397156604.png

 

Hi, @clint_powell 

 

Syntax error for all() function

 

See my code properly

You miss  ) to finish all() function

 

filter(

  all(tablename[columnname]),

 tablename[columnname]<>blank()

)

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.and don't forgot to give kudos.

That was it, thanks so much!

Dangar332
Super User
Super User

hi, @clint_powell 

use all() function it give unique value of column

like below

all(tablename[columnname])

Thanks! Is there a way to pull in all the values, but ignore the nulls?

hi, @clint_powell 

try below

filter(
  all(tablename[columnname]),
 tablename[columnname]<>blank()
)

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.and don't forgot to give kudos.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors