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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Jaceks123123
New Member

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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