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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

Error using Expression.Evaluate & #shared for dynamic query refrence

I have a number of different finiancial queries for each quarter and I want to be able to choose which to pull from dynamically.

I attempted to accomplish this like so:

 

Source = Expression.Evaluate("LY-All Branch Summery-Q"&Quarter, #shared)

 

Unfortunatly this threw an error at me:

Expression.Error: [1,8-1,14] Token Eof expected.
Details:
[List]

To Diagnose this I hardcoded the query name, and in another step referenced the query with the more common #"Queryname" approch.

 

let    
    Source = Expression.Evaluate("LY-All Branch Summery-Q1", #shared),
    Source1 = #"LY-All Branch Summery-Q1"
in
    Source1

 

In this query If I go to step 'Source" I get the same error as above. "Source1" however gives me the query as expected.

 

What am I doing wrong here?

Thanks in advance

Joseph

1 ACCEPTED SOLUTION
AlienSx
Super User
Super User

this call works just fine

Expression.Evaluate("#""LY-All Branch Summery-Q1""", #shared)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Why, it does indeed!

I was able to use that to make my dynamic names work:

= Expression.Evaluate("#""LY-All Branch Summery-Q" & Quarter & """", #shared)

Thanks AlienSx!

AlienSx
Super User
Super User

this call works just fine

Expression.Evaluate("#""LY-All Branch Summery-Q1""", #shared)

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.