Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LadyRobot
Frequent Visitor

API and power query

Hello all, 

I have API connected to the Power BI and when I would like to add direct query it is not bringing it into as the query is contains tranformations ( changed name of the column and I get rid of some days of the data which i do not want to use)

LadyRobot_0-1664791286968.png

 

I am wondering how can I get the data work without the IMPORT MODE as this force me to update the dashboard daily, we are trying for automatization, can anyone give me a guide or hint? 

Thank you in advance.

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @LadyRobot 

 

When using DirectQuery, any transformation will need to be applied on every query to the underlying source, rather than once on data refresh, so they're limited to those transformations that can reasonably be translated into a single native query. If you use a transformation that is too complex, you receive an error that either it must be deleted or the model switched to import. 

 

If you must use DirectQuery, you need to perform those transformations in the data source in advance. If you use relational sources, like SQL Server, you can try creating a view in the database to change column names and filter data. Then connect to this view in Power BI. 

 

If you accept Import mode, you can publish the report to Power BI Service and set a scheduled refresh for the dataset. If the dataset connects to on-premises data sources, you need to set up an on-premises data gateway and use it to refresh the dataset. 

 

Configure scheduled refresh - Power BI | Microsoft Learn

On-premises data gateway - Power BI | Microsoft Learn

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @LadyRobot 

 

When using DirectQuery, any transformation will need to be applied on every query to the underlying source, rather than once on data refresh, so they're limited to those transformations that can reasonably be translated into a single native query. If you use a transformation that is too complex, you receive an error that either it must be deleted or the model switched to import. 

 

If you must use DirectQuery, you need to perform those transformations in the data source in advance. If you use relational sources, like SQL Server, you can try creating a view in the database to change column names and filter data. Then connect to this view in Power BI. 

 

If you accept Import mode, you can publish the report to Power BI Service and set a scheduled refresh for the dataset. If the dataset connects to on-premises data sources, you need to set up an on-premises data gateway and use it to refresh the dataset. 

 

Configure scheduled refresh - Power BI | Microsoft Learn

On-premises data gateway - Power BI | Microsoft Learn

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors