Forum Discussion
D_P
3 years agoFrequent Visitor
Add Column: conditional statement and numeric parameter
I created a numeric parameter that allows the user to choose a value between 0 and 20. And a measure that tells me what number was chosen: I have a table Product and I want to ...
D_P
3 years agoFrequent Visitor
Assuming that this was the user input:
The expected output was:
- Dhairya3 years agoSolution Supplier
Hey D_P
Instead of creating a calculated column, create a measure using the below codeNew Price =
IF(
SELECTEDVALUE(TableA[Name]) = "A",
CALCULATE(Parameter[Parameter Value] * SELECTEDVALUE(TableA[Price])),
MAX(TableA[Price])
)You will get the following output
If this helps you then please give it a kudo and mark my solution as accepted so that other can find it quickly on facing similar issue. Thank You!