Forum Discussion
karthikmiriyala
3 years agoFrequent Visitor
Add dynamic Categories from what if parameter
Hi,
I am trying to create a column that categorizes Groups from input What if parameters. Groups are not changing with the input values.
These are the Default values that are given.
Groups are forming with these default values, if I am changing slicers values Groups should also change, which is not happening.
Thank you in advance.
9 Replies
- JorgePinhoSolution Sage
Hello karthikmiriyala !
I believe you need to use SELECTEDVALUE() on _selected_x and _selected_y.
Something like: _selected_x = SELECTEDVALUE(' Sepal Lenght'[...])
- karthikmiriyalaFrequent VisitorVAR X = VALUE(iris[sepal.length])VAR Y = VALUE(iris[sepal.width])VAR _selected_X = SELECTEDVALUE('Sepal Length'[Sepal Length])VAR _selected_Y = SELECTEDVALUE('Sepal Width'[Sepal Width])RETURNSWITCH(TRUE(),X <= _selected_X && Y <= _selected_Y , "Group 1",X <= _selected_Y && Y > _selected_Y , "Group 2",X > _selected_Y && Y <= _selected_Y , "Group 3",X > _selected_Y && Y > _selected_Y , "Group 4",BLANK())If I am giving Selectedvalue() then all groups show Group 4.
- JorgePinhoSolution Sage
I'm not sure if I'm thinking correct but why are you comparing the X with the selected Y on the 3 last conditions?