cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

ERROR "A table of multiple values was provided where a single value was expected."

Hello good day, I have a problem with the next calculated column "accounting account".
This calculated column had been running smoothly, but stopped working by throwing the following message "A table of several values was provided where a single value was expected.


Management =
IF('Supplier Flow'[Cost Center] = "No Cost Center Found",'Supplier Flow'[Accounting Account],'Supplier Flow'[Cost Center])


Accounting Account = IF(LOOKUPVALUE('Accounting Movements for Accounting Account'[Accounting Account],'Accounting Movements for Accounting Account'[Comb(Folio,NDoc)],'Supplier Flow'[Comb(Folio,NDoc)]) = "Export Materials Stock","Exports",LOOKUPVALUE('Accounting Movements for Accounting Account'[Accounting Account],'Accounting Movements for Accounting Account'[Comb(Folio,NDoc)],'Supplier Flow'[Comb(Folio,NDoc)]))

Accounting account will look for the combination to the following Table "Accounting Movements for accounting account" which does not have unique records.

wzuniga_0-1650642345688.png

I hope you can help me, since before the report worked without problems :C

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Thank you very much for the help, the problem arose since there are duplicate records with the same information. for example the following:

wzuniga_0-1650648880846.pngPerform a filter to remove duplicates by PowerQuery leaving the report functional again.

thank you very much as well!

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Thank you very much for the help, the problem arose since there are duplicate records with the same information. for example the following:

wzuniga_0-1650648880846.pngPerform a filter to remove duplicates by PowerQuery leaving the report functional again.

thank you very much as well!

amitchandak
Super User
Super User

@Syndicate_Admin , it seem like lookup is giving more than one value

 

Try like

 

Accounting Account = if( maxx(filter('Accounting Movements for Accounting Account', 'Accounting Movements for Accounting Account'[Comb(Folio,NDoc)]= 'Supplier Flow'[Comb(Folio,NDoc)] ) 'Accounting Movements for Accounting Account'[Accounting Account]) = "Export Materials Stock","Exports",
maxx(filter('Accounting Movements for Accounting Account' ,'Accounting Movements for Accounting Account'[Comb(Folio,NDoc)] = 'Supplier Flow'[Comb(Folio,NDoc)]), 'Accounting Movements for Accounting Account'[Accounting Account]))

wzuniga_1-1650646961101.png

Maybe I'm doing something wrong, but it doesn't take my face.
Could you share the report file for more help?

Helpful resources

Announcements
Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors