Forum Discussion
Time Intelligence Functions Not Working After Changing Database Source in Advanced Editor
- 11 months ago
hi, fayzy100
when i had multiple data sources in my project i used parameters for the database name, i never faced any issue, we used to change dadtasource dynamically from parameters without touching the source code. when you change the datasource powerbi will change the internal column ids, even though your columns have similar names their ordering ids will be different, can you confirm which data source you were using in dev and what is in prod?
Hi fayzy100 ,
Thank you for reaching out to the Microsoft Community Forum.
Changing the data source via the Advanced Editor in Power BI can disrupt Time Intelligence DAX functions, even when the schema and relationships appear unchanged. Time Intelligence functions breaking after changing the data source (especially via Advanced Editor) due to lineage loss.
Please try below options to fix the issue.
1. Extract the source steps into a separate query. Create a new query for the new source. Point your main query to the new source query. This minimizes disruption to transformations and lineage.
2. Check the Date column is of type Date not DateTime, and that it’s consistently named and formatted across sources.
3. Instead of editing queries directly, In Power Query --> Manage Parameters --> create: ServerName and DatabaseName. Modify your source step.
Source = Sql.Database(ServerName, DatabaseName)
Note: when switching between test/production, change parameter values only, lineage remains intact.
Please refer below links.
Solved: Changing data source without effecting all query s... - Microsoft Fabric Community
Solved: Re: Time Intelligence Functions not working - what... - Microsoft Fabric Community
Solved: Dataflow Workspace lineage keeps old Data source i... - Microsoft Fabric Community
Solved: Change Data Lineage from Web Interface - Microsoft Fabric Community
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
- v-dineshya11 months ago
Community Support
Hi fayzy100 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh
- v-dineshya10 months ago
Community Support
Hi @fayzy100 ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh