Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

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. 

 

RegionCustom Region
AfricaMECAA
South AfricaMECAA
MENAMECAA
MECAAMECAA
AmericasAmericas
AMEAmericas
EuropeEurope
LondonEurope
AsiaAPAC
APACAPAC
IndiaIndia

6 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft 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

    • Anonymous's avatar
      Anonymous
      Not 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's avatar
        v-yulgu-msft
        Icon for Microsoft Employee rankMicrosoft 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