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
tecumseh
Helper II
Helper II

A Single Value For Column Cannot Be Determined

Hi,

Using up-to-date version of PBID.
I'm getting an error from LOOKUPVALUE()

A Single Value For Column Cannot Be Determined....

I don't understand that. I checked the Table I'm trying to get a value from - the list is definitely unique, 22 rows values. The values are mix of Alpha numeric : AAA - 10, BBB - 20, etc....

The Calc Table I am tring to add a column to definetely has some duplicate values - but that should not matter.

I tested on some dummy data with similar pattern as my data and the Calc Column Returned the expected results, where the Dim Table has unique values and the Fact Table has duplicate Values.

In my sample test, I just quickly entered some test data in both tables.
In my production semantic model, the dim table is derived through a couple of different Calc Tables. But I can see they are unique values. I copied the dim table, pasted to Excel, ran a Countifs on the PK Column, sure enough, just 1's returned.

What else can I do to get the Lookup to work on the Fact Table?

Here's the DAX from the Production Model that isn't working correctly

 

VAR __Z50 = 
ADDCOLUMNS(
__Z40,
"Recovered Customer",
LOOKUPVALUE(
NB_05_Recovered_Distinct[Recovered Customer],
[Customer ID],
NB_05_Recovered_Distinct[Customer ID]
)
)


Thanks,
w






1 ACCEPTED SOLUTION

Thanks @v-heq-msft ,

I think, in the end, the issue was that I was trying create a LOOKUPVALUE from one Calc_Table to another within the same lineage. This was causing a Circular error when trying in Step 6 in the diagram below to apply the Recover Customer List from Step 5 to All Customers in Step 2.

Instead, I duplicated the Calc Table in Step 02 and renamed it so it is no longer on the same lineage tree and I was able to apply the 21 Recovered Customers from NB_05 to the new Summary_For_Recovered Calc Table (Orange in the diagram). So now I have a Table with 133 record flagged as Recovered.

Thanks,
-w

Recover_Flow.PNG

View solution in original post

3 REPLIES 3
v-heq-msft
Community Support
Community Support

Hi @tecumseh ,
Based on your description, I tested it and the duplicate values in the fact table you mentioned really don't affect the syntactic structure of the LOOKVALUE expression, but I noticed that your third parameter in LOOKUPVALUE uses a column in the table, which could be the reason for the error. To fix this, you can prefix the third argument with SELECTEDVALE to make sure that it is the only value to be judged.
Here is my test data:
Dim

vheqmsft_0-1706861884422.png

Fact

vheqmsft_1-1706861900445.png

 

Measure = 
LOOKUPVALUE(
    'FACT'[VALUE],
    DIM[VALUE],
    SELECTEDVALUE('FACT'[VALUE])
)

 

Final output

vheqmsft_2-1706861946873.png

Reason

vheqmsft_3-1706861995620.png

 



Best regards

Albert He

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Thanks @v-heq-msft ,

I think, in the end, the issue was that I was trying create a LOOKUPVALUE from one Calc_Table to another within the same lineage. This was causing a Circular error when trying in Step 6 in the diagram below to apply the Recover Customer List from Step 5 to All Customers in Step 2.

Instead, I duplicated the Calc Table in Step 02 and renamed it so it is no longer on the same lineage tree and I was able to apply the 21 Recovered Customers from NB_05 to the new Summary_For_Recovered Calc Table (Orange in the diagram). So now I have a Table with 133 record flagged as Recovered.

Thanks,
-w

Recover_Flow.PNG

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.