Forum Discussion
DNicoll
5 years agoNew Member
Get Data from Server within a dynamic date range
Hi, I see there is a post - Dynamic Data fetch trigger while changing the date range, with a similar question. It is fairly old so I was wondering if there was any update. I have the same issue, I ...
TomMartens
5 years agoSuper User
Hey DNicoll ,
depending on the data source you can use Dynamic M Paramters, but just a couple of datasources are supporting this feature at the current moment: https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters#:~:text=Dynamic%20M%20Query%20Parameters%20are%20currently%20in%20preview%2C,BI%20Desktop%20for%20the%20change%20to%20be%20enabled.
If you want to use DirectQuery, there are two options
- create a table that just contains the data you want to be accessed by the Power BI users and restrict the users to this table
- create a view on top of the table that restricts the data, to the proper timeframe, but of course this might limit the strain to the source system that much, depending on the source system you can create indexed or materialized views
Another solution, just import the data into a Power BI dataset and limit the users to this dataset. Then the do not have to query the original data source.
Hopefully, this provides some ideas on how to tackle your challenge.
Regards,
Tom