Forum Discussion
LOOKUPVALUE with Direct Query or an alternative needed
- 5 years ago
Glad to help. Can you mark one/more of these as the solution so this thread can be closed.
On a semi-related matter, you don't need LOOKUPVALUE here either. You are thinking VLOOKUP in Excel. In Power BI, you should usually think merge. LOOKUPVALUE has its uses, but it is pretty rare - much rarer than doing any kind of VLOOKUP/XLOOKUP in Excel because of how merges and the data model works.See this file. It shows you how to merge those two tables and bring the TRUE/FALSE column into the first table. In Power BI, it the Transform button on the Home ribbon to get into Power Query to see it.
You shouldn't be using Direct Query gaiusgw . If your data updates daily, just use a Scheduled Refresh to import the data. You can refreh data in a Pro workspace 8 times a day, and a Premium or Premium Per User workspace 48 times a day. Direct Query is almost always overused in the perceived desire to have up to date data, but it has many drawbacks:
- Time Intelligence doesn't work
- Some DAX functions don't work
- Some visuals have limited support
- The experience for the report viewer is often slower
People new to Power BI often fall into the "Direct Query gives me up to date info" trap and quickly paint themselves into a functionality corner. I did the same thing when I started. Now, I rarely use it.
- gaiusgw5 years agoHelper III
edhans thanks for the explaniation and warning. I have been at this less than 1 month and assumed like you said that directquery was the best option. I am using desktop right now. Do you know if the data refreshes each time it is opened? Or must you actually click refresh? I am not finding a setting to autorefesh when opening using desktop. Also, do you know if it possible to change the source to import or must i start from scratch? Thanks a lot.
- edhans5 years agoCommunity Champion
You can convert from Direct Query to Import. You cannot go the other way though. At the bottom of your report there is a button to switch. Click it and this dialog opens warning you this is a one way street, and then let's you change to Import.
The service is where scheduled refreshes happen. The desktop app is only for development. You publish to the service, then set refreshes there on a schedule. That is where you do your analysis.
- gaiusgw5 years agoHelper III
So i did covert to import but i see an issue. some of the tables i am working with have over 1.6 million lines and so it takes about 15 minutes to refresh on desktop currently. this is 5 years worth of data so i can expect in another 5 years it will take 30 minutes to load and so on. directquery takes less than 30 seconds to load. am i in a rock and a hard place here? either take 15-30 mintues to load everyday or use directquery and not have the certain functions like LOOKUPVALUE? is there a way to import just new lines to cut down refresh time?