Forum Discussion
How to bucket a column values(Text) through measure
I want to create a custom column through measure only. As shown in the below table I have a column (Region) basis i want to create Custom Region.
Can someone help on this.
| Region | Custom Region |
| Africa | MECAA |
| South Africa | MECAA |
| MENA | MECAA |
| MECAA | MECAA |
| Americas | Americas |
| AME | Americas |
| Europe | Europe |
| London | Europe |
| Asia | APAC |
| APAC | APAC |
| India | India |
6 Replies
- v-yulgu-msft
Microsoft Employee
Hi Anonymous,
If you already have a lookup table which uniquely shows the mapping relation between Region and its corresponding Custom Region type, you can establish a relationship between two tables based on [Region] and create a measure similar to:
Measure = MAX(LookUpTable[Custom Region])
Regards,
Yuliana Gu
- AnonymousNot applicable
Hi Yulina,
Thanks for your inputs. However i am not using any Lookup table here. There is only one table which is having one column. Since I am unsing the live connection I cannot create custom columns or Lookup table. I have to group that column with measure only. Can you or Someone will help here. I tried with
Measure(Custom Region) - If(Values(Table[Region]="Africa") || Values(Table[Region]="MENA"),"MECAA")
but gettong the error.
Please let me know if you have any solution on this.
- v-yulgu-msft
Microsoft Employee
Hi Anonymous,
Please modify the measure formula:
Measure(Custom Region)= If(SELECTEDVALUE(Table[Region]="Africa")||SELECTEDVALUE(Table[Region]="MENA"),"MECAA")
Best regards,
Yuliana Gu