Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ BI Tools and Applications _ Power Bi Can't Recall A Query With End And Start Date Parameter

Posted by: 2ME Oct 31 2019, 12:49 PM

Hi,
I have a query where two dates parameter
When I try to get the data in power bi I don't have an option to view that query (the query doesn't appear among other tables and queries)
And if I removed the dates from where clause I can select the query within power bi
My question, is there any work around to get the query with two dates parameter within power bi?

Thanks in advance for your suggestion and help

Posted by: GroverParkGeorge Oct 31 2019, 01:04 PM

I doubt it. I think the best choice will be to do the filtering in Power BI.

Posted by: 2ME Oct 31 2019, 01:10 PM

How can I set the two dates parameters in power bi?

Posted by: MadPiet Oct 31 2019, 01:19 PM

Where is your data coming from? You can filter the data before you load it, or load the data from a query in the source.
if you don't just "Close & Load", you can filter the dataset before it imports it all.

Posted by: 2ME Oct 31 2019, 01:40 PM

Hi MadPiet
The data comes from access query
"You can filter the data before you load it, or load the data from a query in the source."
I tried to open the query and used the filter before getting the data to power bi .. but the query wasn't there at all to select it

After removing the date parameter the query appeared to select it within power bi

Posted by: GroverParkGeorge Oct 31 2019, 01:47 PM

In the Power BI editing interface, load a project and then select the "Data" view for you data sources:



Select the query you want to filter.

Then apply parameters to it.



If you need dynamic filtering, you can add filters to the chart displaying the data:








Posted by: 2ME Oct 31 2019, 01:51 PM

GroverParkGeorge thank you very much for your help I will give it a try and come back to review the result
Thank you again

Posted by: 2ME Oct 31 2019, 02:35 PM

Hi MadPiet
"or load the data from a query in the source."
How can I do that?

Posted by: MadPiet Oct 31 2019, 02:50 PM

Oh, Guess you can't do that with Access as a source. You can with SQL Server. If you connect to a SQL Server DB, you have an advanced option where you can specify a query to run. (Or even just type in the SQL).

Posted by: 2ME Oct 31 2019, 03:01 PM

What about creating a temp table and append the query after filter to the temp table?

Posted by: GroverParkGeorge Oct 31 2019, 03:23 PM

You could do that, but that means the process always starts on the Access side with the "flush and refill" of the temp table.

I am pretty sure, though, that you can apply your filters in Power BI itself against the table(s) and quer(ies) you need.


Posted by: 2ME Nov 4 2019, 08:26 AM

GroverParkGeorge

Thank you very much for your help, I used slicer to filter against the queries and it works

thank you again

Posted by: GroverParkGeorge Nov 4 2019, 10:00 AM

Congratulations on solving the problem.

Continued success with your project.