Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I am using Direct Query mode in my power bi report.
I have created date table in power bi like below :
I am also using special dates (e.g. Last 7 days, Last Month). So I have created that power bi table like below :
I gave relationship to both the above tables using Date.
Question : When I use date slicer to filter my report, SQL query automatically generated and it uses Where Dates IN (dt1,dt2) query. Due to large date range, IN operator works slow. Please see below screenshot :
Is there any way I can control this query or change my implementation of report so that query should be where Dates Between 'dt1' and 'dt2'. So that it improves overall result time.
Change your implementation. Maintain your dates table in SQL (table or view), and - ideally- change it to import mode with daily refresh. There is really no need to recompute that table for every query,
User | Count |
---|---|
85 | |
79 | |
64 | |
52 | |
46 |
User | Count |
---|---|
101 | |
44 | |
41 | |
39 | |
37 |