Forum Discussion
mterry
7 years agoHelper V
Errors using 'RELATED' with new data set
I originally received a resolution to this problem, but since have had to move on to slightly new data sets and am having an issue using the solutions posted in the link. Here's a link to the origina...
- 7 years ago
Hi mterry,
Please download the demo from the attachment.
I added a custom index in the [Location List] from the Query editor. Now only one value will be matched.
let code_p = [Code], year_p = [Year], index_p =[Index] in List.Accumulate(Table.SelectRows(#"Added Index", each [Code] = code_p and [Year] = year_p and [Index] <= index_p)[Office_Name], 0, (index, value) => index + 1)
Column = VAR strictName = LOOKUPVALUE ( 'Location List'[Office_Name], 'Location List'[Code], [Code], [Year], YEAR ( [Spend Date] ), [CustomIndex], 1 ) RETURN IF ( ISBLANK ( strictName ), "Misc", strictName )
Best Regards,
mterry
7 years agoHelper V
Thanks for the help; however, when I tried to create that column, I got an error saying "A table of multiple values was supplied where a single value was expected".
I do have multiple tables that have different spend information - is the easiest way to solve this problem to create a column on each of those? Or is there a way to have one single table (or even create that table in BI) where the 'strictName' is the default location?
mterry
7 years agoHelper V
Wanted to bump this up to see if anyone knew why I might be getting the error I listed.
