Forum Discussion
Conditional column Based on Switch function - Error
- 3 years ago
Hi SriGaG1 ,
You can add a measure to the visual:
Measure = VAR _a = SWITCH ( MAX ( Parameter[Parameter] ), "Overall", MAX ( 'Table'[Customer overall Satisfaction Rating] ), "Safety", MAX ( 'Table'[Customer Safety Satisfaction Rating] ) ) VAR _b = SWITCH ( _a, 1, "dissatisfied", 2, "dissatisfied", 3, "neutral", 4, "satisfied", 5, "satisfied" ) RETURN _bFinal output:
Besides, this question is beyond the original topic of this thread, so if you still have any other questions, please consider marking the responses that are helpful to you and creating a new thread in order to better help others with similar questions. This will make the post more relevant and will allow more people to help you!
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi SriGaG1
I am pretty sure that you need to add the SELECTEDVALUE function:
Total Satisfaction =
SWITCH(
SELECTEDVALUE(Satisfction[Satisfaction Type]),
"Overall",MAX(Data[Customer_overall_Satisfaction_Rating]),
"Safety",MAX(Data[Customer_Safety_Satisfaction_Rating])
)Best regards
Michael
-----------------------------------------------------
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your thumbs up!
@ me in replies or I'll lose your thread.
-----------------------------------------------------
- SriGaG13 years ago
Helper II
Mikelytics Thank you very much for your answer. Its not workin actually. I have tried that one too 😞
- Mikelytics3 years ago
Resident Rockstar
SriGaG1 @Can you please show a picture of the data model? Do you added a relationship? If yes, you have to remove the relation.
Best regards
Michael