Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Solved! Go to 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
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
Fact
Measure =
LOOKUPVALUE(
'FACT'[VALUE],
DIM[VALUE],
SELECTEDVALUE('FACT'[VALUE])
)
Final output
Reason
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
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...
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
95 | |
90 | |
35 | |
35 |
User | Count |
---|---|
153 | |
99 | |
82 | |
63 | |
54 |