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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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