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
HamidBee
Power Participant
Power Participant

What is data type, value field and label field in Power BI Report Builder for Parameters?

I have created a parameter on Power BI Report Builder. I specified a 'Name' for the parameter and a 'Prompt'. I also specified a data type which seems to be linked to the 'Value field'. The image can be seen below:

 

Power_BI.png

I have also specified a value and label field. What does the 'Value field' and 'Label field' refer to?.

 

Power_BI2.png

 

Strangely when I run the report I can choose values I entered in the 'Label Field' eariler even though I had set the 'Data Type' to 'text'. However, when I run the report I don't get any values for ID or Movies. 

 

Power_BI3.png

However, when I change the 'Value field' to 'ID' and...

 

Power_BI4.png

run the report, values appear in the report this time.

 

Power_BI5.png

1. What is meant by 'Data Type' underneath 'Prompt'? For which variable is it referring to?

2. What is the difference between 'Value field' and 'Label field'?

3. Why is it that when I ran my report the first time I got no values for 'ID' and 'Movies'?

 

Thank you

 

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User


@HamidBee wrote:

1. What is meant by 'Data Type' underneath 'Prompt'? For which variable is it referring to?

 


It is referring to the data type to use for the parameter itself

 


@HamidBee wrote:

2. What is the difference between 'Value field' and 'Label field'?

 


The Value is what is passed to the query typically to be used as a filter of some sort. The Label is the value to show to the user in the drop down. Sometimes these can be the same field, but other times you might want to show the user a list of movie names, but then pass through the movie ID as it can make the underlying query easier and more performant as you can sometimes then elminate a join.

 


@HamidBee wrote:

3. Why is it that when I ran my report the first time I got no values for 'ID' and 'Movies'?

 


This is probably because you query would have been evaluated as something like the following the first time

     SELECT ... FROM movies WHERE ID = 'The Godfather'


And there are no ID values of 'The Godfather' so you get 0 rows.

The second time you ran the query it would have been evaluated as 

     SELECT ... FROM movies WHERE ID = '1'

And SQL would have done an implicit cast from the string '1' to the integer value of 1. It is normally better to avoid implied casts and set the datatype of your parameter to match the datatype of the column you are filtering.

View solution in original post

4 REPLIES 4
d_gosbell
Super User
Super User


@HamidBee wrote:

1. What is meant by 'Data Type' underneath 'Prompt'? For which variable is it referring to?

 


It is referring to the data type to use for the parameter itself

 


@HamidBee wrote:

2. What is the difference between 'Value field' and 'Label field'?

 


The Value is what is passed to the query typically to be used as a filter of some sort. The Label is the value to show to the user in the drop down. Sometimes these can be the same field, but other times you might want to show the user a list of movie names, but then pass through the movie ID as it can make the underlying query easier and more performant as you can sometimes then elminate a join.

 


@HamidBee wrote:

3. Why is it that when I ran my report the first time I got no values for 'ID' and 'Movies'?

 


This is probably because you query would have been evaluated as something like the following the first time

     SELECT ... FROM movies WHERE ID = 'The Godfather'


And there are no ID values of 'The Godfather' so you get 0 rows.

The second time you ran the query it would have been evaluated as 

     SELECT ... FROM movies WHERE ID = '1'

And SQL would have done an implicit cast from the string '1' to the integer value of 1. It is normally better to avoid implied casts and set the datatype of your parameter to match the datatype of the column you are filtering.

Thanks for the very detailed explanation. Things are starting to click for me. Except for.....cascading parameters. It worked okay when I created one and two. But the third one really got me. 

https://community.powerbi.com/t5/Desktop/Cascading-Report-in-Power-BI-Report-Builder-Causing-Errors/...

Please feel free to take a look if you ever get the chance.  


@HamidBee wrote:

Thanks for the very detailed explanation. Things are starting to click for me. Except for.....cascading parameters. It worked okay when I created one and two. But the third one really got me. 

https://community.powerbi.com/t5/Desktop/Cascading-Report-in-Power-BI-Report-Builder-Causing-Errors/...

Please feel free to take a look if you ever get the chance.  


It seems you already have 2 responses to that other question

Thanks for taking a look anwyay. 

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.