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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
robon
Frequent Visitor

Use table as variable

When i want to use a table value as variable i get the error Expression.Error cannot use operator & with Text and Table(Sorry translated from Dutch)

 

this is the line of the error:

<SessionID>"& Session_ID() &"</SessionID>

 

what am i doing wrong?

Thanks 


Rob

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @robon ,

 

Sorry for that the information you have provided is not making the problem clear to me.

If you want to use the values in column as variables ,please use the following formula to create a calculated column or a measure:

Column = 
var columnVariable=[Session]
return [Session] &" - " & "Table1" 
Measure = 
var measureVariable=MAX('Table1'[Session])
return measureVariable &" - " & "Table1"

variable.PNG

 

If it does not make sense, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @robon ,

 

Could you tell me if my post helps you a little? If it is, kindly Accept it as the solution to make the thread closed. More people will benefit from it.

Hope to hear from you‌‌😀

 

Best Regards,
Eyelyn Qin

 

Sorry Eyelyn,

 

it works thanx a lot

 

Rob

 

Anonymous
Not applicable

Hi @robon ,

 

Sorry for that the information you have provided is not making the problem clear to me.

If you want to use the values in column as variables ,please use the following formula to create a calculated column or a measure:

Column = 
var columnVariable=[Session]
return [Session] &" - " & "Table1" 
Measure = 
var measureVariable=MAX('Table1'[Session])
return measureVariable &" - " & "Table1"

variable.PNG

 

If it does not make sense, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors