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 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.
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?
- edhans5 years agoCommunity Champion
You would do this using Incremental Refresh - in the service. You set it up in the desktop, but when you publish, it will only refresh recent data - whatever that is for you. Last 5 days, 5 weeks, 2 years. Whatever. The older data is retained.
But even if you don't use incremental refresh, the service refreshes automatically. So you said this was updated daily. So set the refresh to happen at 11pm. When you come in the next morning, it is up to date. You can even work in the report in the service while it is refreshing. When it is done, it will show you newer data if you refresh your browser or change your pages.The 15min for 1.6M lines seems like something else is going on too. I can use the 12M+ record Contoso database and it takes less than 5Min to fully refresh on my laptop, so it may be your server is part of the speed issue. You can read more about Incremental Refresh here.
I appreciate that you are new to Power BI. It is very powerful and will ultimately be a rewarding experience for you. But today I think you are looking at it like Excel where you have Excel and that is your data. Power BI is not Power BI Desktop. Power BI is the Power BI Desktop app, workspaces in the service, scheduled refresh settings, Reports, Apps, Sharing, and more. When you limit yourself to just the desktop app, you are hitting the roadblocks you are getting frustrated with. Power BI Desktop is not designed to be the end user analysis tool. The service is. But you have to understand how most of the pieces fit together. One place to get started is here. There are books about Power BI you could read. One is by Reza Rad called From Rookie to Rockstar. It is so massive it is 4 books, but also free. The first book has a lot of info on the service, talks about workspaces, refreshes, etc.
There are videos too, and for pay courses. They will help you see more clearly than I can in a community post how all of the pieces fit together.
- gaiusgw5 years agoHelper III
I really appreciate your time and all the detailed explaniations and resources you have shared. Thanks a lot.
- edhans5 years agoCommunity Champion
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.