Forum Discussion
HR30385
2 years agoRegular 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:
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 parameter is formatted as text and shows values:
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!
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])
2 Replies
- vicky_
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])- HR303Frequent Visitor
Great. Thanks for the answer.