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
Syndicate_Admin
Administrator
Administrator

DISTINCT: A multi-value table was provided where a single value was expected.

I have a problem when trying to delete duplicate customers, the topic is the following, I have users but I need to have only one row per user and next to it the date of their LAST login, I did this but it gives me the following error:

" The expression refers to several columns. You can't convert multiple columns to a scalar value. "

Column = SUMMARIZE( Clientes_compradores_AWS, "date", Clientes_compradores_AWS[start date],"Customers", LASTNONBLANK(Clientes_compradores_AWS[cliente_id], 1))
I replaced the LASTNONBLANK function with DISTINCT but the error I get is the same, I can't understand the cause.
1 ACCEPTED SOLUTION
vicky_
Super User
Super User

Hey

This type of transformation is best done using PowerQuery - you can check this guide for more details: https://exceleratorbi.com.au/remove-duplicates-keep-last-record-power-query/

The reason that you get the error above is that SUMMARIZE will return a TABLE (which can contain more than one value per cell in the column). To fix this, you can either create a new TABLE instead of a new column, or you will need to aggregate the table to only return a value if the client is the latest (e.g. MAX([date], or something like that)

View solution in original post

1 REPLY 1
vicky_
Super User
Super User

Hey

This type of transformation is best done using PowerQuery - you can check this guide for more details: https://exceleratorbi.com.au/remove-duplicates-keep-last-record-power-query/

The reason that you get the error above is that SUMMARIZE will return a TABLE (which can contain more than one value per cell in the column). To fix this, you can either create a new TABLE instead of a new column, or you will need to aggregate the table to only return a value if the client is the latest (e.g. MAX([date], or something like that)

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.