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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Direct Query with Parameter Partition Error

Running into an issue setting up parameterized direct query in power query.  I currently have the power query advanced editor executing against the query below and it actually works in power query.  

 

 

 

let
    Results = 
    Text.Combine(
        {
            "
            select *
            from (
                select a.ID, a.NewValue, a.OldValue
                from sf.LH a
                join sf.L b on a.LeadId = b.Id
                where b.CAI = '", #"PARAM_Selected Account", "'
            
                union all
            
                select a.ID, a.NewValue, a.OldValue
                from sf.CH a
                join sf.C b on a.ContactId = b.Id
                where b.AI = '", #"PARAM_Selected Account", "'
            ) X
            "
        }
    ),
    Source = Sql.Database("X", "Y", [Query=Results])
in
    Source

 

 

 

I get an error however when I close and apply to make the changes back to the model below:

 

 

Failed to save modifications to the server. Error returned: 'DirectQuery partition 'LU_History-e698b91f-643c-4242-bb5c-8151a9911992' has '2' datasource reference(s) in its expression which is not allowed. '

 

 

 

Any thoughts into what causes this to fail when trying to commit back to the model and how to get the parameterized DQ configuration to function?

1 REPLY 1
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

It works fine in my PBI Desktop. What is your version of Desktop?

 

Here are some similar threads, hope they help you.

 

Error on apply Power Query: Expression in partition n/a in table n/a references an unknown entity 

https://community.powerbi.com/t5/Desktop/Unable-to-delete-or-rename-Direct-Queries-due-to-new-error/td-p/1329364 

Behind the scenes of the Data Privacy Firewall 

 

Best Regards,
Winniz

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors