I want to initialize a variable in OnStart from a value stored in an Excel Table. It's not working for me.
I have a table called Constants. One row is as follows:
Name = "Inbound Threshold"
Measure = "Business days" (for documentation only)
LookupValue = 2
I'm trying to add the following OnStart Code:
set (InboundThreshold, Lookup(Constants, Name="Inbound Threshold", LookupValue)
I'm expecting it to create a variable called InboundThreshold with a value of 2.
What is wrong? It's not loading anything. It does recognize the table column names, so I know I've connected successfully to the table.
Go to Solution.
I solved it. Apparently I had the table locked. I closed the Excel table and it worked fine.
So often it's a stupid mistake. 🙂
View solution in original post
I have 3 ideas to share with you.
#1 There is a missing bracket at the end of your code
Set(InboundThreshold, Lookup(Constants, Name="Inbound Threshold", LookupValue))
#2 How many records does your Excel table hold? The delegation limit is 500 records. LookUp might not be seeing past the 500th record. You can increase the limit to 2,000 records in advanced settings.
#3 Are there mutliple records with the Name "Inbound Threshold"? LookUp will only return the 1st result.
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand