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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Pass a text parameter in report

Hello,

 

I want to pass a text parameter to a report in order to filter the data by this parameter in report view (What If Parameter). 

I have made a calculated column where the data to be shown with IF statement with a logical test form the parameter but for the moment I can enter in parameter list only number values. I think this is not working as well, beacouse in the calc column - DATA, the values are not chaning when i choose another oprion from the paramter.

At the moment is like this:
Parameter: Type;
Options: 1,2,3

I want to be
Parameter: Type;
Options: Quality, Sales Amount, Margin

 

The idea is the whole report to be shown for a specific type of data, not to make 3 different reports for each type of data.

Thanks a lot!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous,

What if parameter is not suitable for your scenario.

In your scenario, create a new table containing the measure name(Quality, Sales Amount, Margin). Add the column of this new table into a slicer so that you can select which measure to display.

And in your original table, you would need to create a measure using the formula below, for more details, please review this blog: http://breaking-bi.blogspot.sg/2016/06/power-bipowerpivot-using-slicers-to.html .

selected measure = IF(HASONEVALUE(NewTable[Column]),SWITCH(FIRSTNONBLANK(NewTable[Column],NewTable[Column]),"Quality",SUM(OriginalTable[Quality]),"Sales Amount",SUM(OriginalTable[Sales]), "Margin",SUM(OriginalTable[Margin])),blank())

Regards,
Lydia

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@Anonymous,

What if parameter is not suitable for your scenario.

In your scenario, create a new table containing the measure name(Quality, Sales Amount, Margin). Add the column of this new table into a slicer so that you can select which measure to display.

And in your original table, you would need to create a measure using the formula below, for more details, please review this blog: http://breaking-bi.blogspot.sg/2016/06/power-bipowerpivot-using-slicers-to.html .

selected measure = IF(HASONEVALUE(NewTable[Column]),SWITCH(FIRSTNONBLANK(NewTable[Column],NewTable[Column]),"Quality",SUM(OriginalTable[Quality]),"Sales Amount",SUM(OriginalTable[Sales]), "Margin",SUM(OriginalTable[Margin])),blank())

Regards,
Lydia

Anonymous
Not applicable

It works, thanks a lot! It will be helpfull for any type of dynamic data filtering.

Anonymous
Not applicable

I have made some tests and i come to the conclusion that the parameter cannot be used in Calculated Columns. Is that true?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors