Forum Discussion
Field parameter in custom column
Since SELECTEDVALUE doesn't work with field parameters, try using MAX instead:
IsDOHWithinLimit =
VAR ParameterValueX =
MAX ( 'Parameter X'[Parameter] )
VAR ParameterValueY =
MAX ( 'Parameter Y'[Parameter] )
VAR ParameterValueZ =
MAX ( 'Parameter Z'[Parameter] )
RETURN
SWITCH (
Sheet1[XYZ],
"X", IF ( Sheet1[Days On Hands] < ParameterValueX, TRUE, FALSE ),
"Y", IF ( Sheet1[Days On Hands] < ParameterValueY, TRUE, FALSE ),
"Z", IF ( Sheet1[Days On Hands] < ParameterValueZ, TRUE, FALSE )
)- jakubkral2 years agoFrequent Visitor
Unfortunately, I tried that as well and it didn't work for me either. I really don't know where the problem could be, because I use field parameters for conditional formatting and it responds there in my charts. It doesn't respond to me when defining custom columns.
- DataInsights2 years agoSuper User
Calculated columns are unable to recognize user filters such as the selected value of a field parameter. Also, would you clarify the logic of comparing a single value in column XYZ to the selected value of a field parameter (this would be a column name or measure name)?
- jakubkral2 years agoFrequent Visitor
The XYZ column assigns to the X, Y or Z group, no other value occurs there and therefore I want it to be compared within the correct parameter. What I want to achieve is for the user to determine what is an acceptable boundary for a given X, Y or Z category. I hope this makes it a little bit clearer. Is there any option how the user can choose the parameter to use in the DAX code for the column?