Forum Discussion
sonuojha1
Helper IV
5 years agoHow to use text columns in Measure?
Hello All, I have a small scenario, where I would like to group the nationality into below categories. If Nationality="Indian" then "A1" if Nationality = "Australian" then "A2" If Nationality ...
- 5 years ago
Hi sonuojha1 ,
You can add the following measure:
Nationality group = SWITCH ( SELECTEDVALUE ( Table[Nationality] ), "Indian", "A1", "Australian", "A2", "American", "A3", "Other" )Be aware that being a measure you need to have the nationality on your visualization otherwise these will not work properly, further more since it's a measure you cannot use it has a axis on visualizations or columns in a matrix visualization.
- 5 years ago
Thanks Miguel.
I have noted your comment.
Regards,
Sonu
MFelix
Super User
5 years agoHi sonuojha1 ,
You can add the following measure:
Nationality group =
SWITCH (
SELECTEDVALUE ( Table[Nationality] ),
"Indian", "A1",
"Australian", "A2",
"American", "A3",
"Other"
)
Be aware that being a measure you need to have the nationality on your visualization otherwise these will not work properly, further more since it's a measure you cannot use it has a axis on visualizations or columns in a matrix visualization.
sonuojha1
Helper IV
5 years agoThanks Miguel.
I have noted your comment.
Regards,
Sonu