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
Anonymous
Not applicable

In Power BI Report Builder Parameter implicitly converted to int

I have a sql server query which is running fine in management studio.

select
'Request ID' As Label,
'sr.SHIPMENT_REQUEST_ID' As Value
union all
select
'Trial ID' As Label,
CONCAT('''''','cs.CLINICAL_STUDY_ID', '''''') As Value
union all
select
'Site ID' As Label,
'css.SITE_ID' As Value

and return

Label Value
-----------------------------------------
1 Request ID sr.SHIPMENT_REQUEST_ID
2 Trial ID ''cs.CLINICAL_STUDY_ID''
3 Site ID css.SITE_ID

After inserting this query into PBI Report Builder
as a parameter to the query, which is in the form of the picture below
and selecting parameter value as 'Request ID' everything works fine
then when 'Trial ID' is selected it returns an error
----- Incorrect syntax near '.'. ------

 

Zapytanie pod stackoverflow.png


If I have a query like this

select
'Request ID' As Label,
'sr.SHIPMENT_REQUEST_ID' As Value
union all
select
'Trial ID' As Label,
'cs.CLINICAL_STUDY_ID' As Value
union all
select
'Site ID' As Label,
'css.SITE_ID' As Value

it returns

Label Value
-----------------------------------------
1 Request ID sr.SHIPMENT_REQUEST_ID
2 Trial ID cs.CLINICAL_STUDY_ID
3 Site ID css.SITE_ID

After inserting this query into PBI Report Builder
as a parameter to the query, which is in the form of the picture above
and selecting parameter value as 'Request ID' everything works fine
then when 'Trial ID' is selected it returns an error
----- Conversion failed when converting the varchar value '213960_UAT'
to data type int. ------

In addition, I noticed that the data in the database for the 'Shipment Request ID' column are only integers
and in the 'Trial ID' column there are both numbers and letters.

 

0 REPLIES 0

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.