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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
HR30385
Regular Visitor

Unable to format Field Parameters as Number

Hi there, 

 

I have a field parameter that let's users select between "net" and "gross" values: 

Parameter Local Currency Gross Net = {
    ("Gross Total LC", NAMEOF('SnapImpactDistributionObjs'[Impact Gross Total LC monthly]), 0),
    ("Net Total LC", NAMEOF('SnapImpactDistributionObjs'[Impact Net Total LC monthly]), 1)
}

The parameter is formatted as text and shows values:

Screenshot 2024-03-24 184537.png

When I change the formatting to any numbers format it gives me an error saying: "Gross Total LC" can not be converted into type integer while the column "Parameter Local Currency Gross Net" is compiled.

The underlying column "Impact Gross Total LC monthly" is a numbers column. 

Does anybody know how to fix this? 

Thanks!
1 ACCEPTED SOLUTION
vicky_
Super User
Super User

The "Parameter Local Currency Gross Net" that you're trying to convert to an Int actually refers to a table. When you create a field parameter, you're actually creating a table of sorts (notice how the part after the equals is "{")

 

If you need to convert any of the actual results you see in your visuals to an integer, you need to format the original measures (i.e SnapImpactDistributionObjs'[Impact Gross Total LC monthly] and SnapImpactDistributionObjs'[Impact Net Total LC monthly])

View solution in original post

2 REPLIES 2
vicky_
Super User
Super User

The "Parameter Local Currency Gross Net" that you're trying to convert to an Int actually refers to a table. When you create a field parameter, you're actually creating a table of sorts (notice how the part after the equals is "{")

 

If you need to convert any of the actual results you see in your visuals to an integer, you need to format the original measures (i.e SnapImpactDistributionObjs'[Impact Gross Total LC monthly] and SnapImpactDistributionObjs'[Impact Net Total LC monthly])
HR303
Frequent Visitor

Great. Thanks for the answer.

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.

Top Kudoed Authors