Forum Discussion

sakshikaul's avatar
sakshikaul
Helper III
5 years ago
Solved

Managing custom filter

HI  In  below given data model I am getting values for a particular column (carrier type as NPC , NPC, OTHERS, PC). I want to create a custom column as carrier_type_new where  NPC values should be ...
  • Pragati11's avatar
    5 years ago

    Hi sakshikaul ,

     

    I see there is a space in NPC value in one instance so there can be 2 ways of fixing this.

    1. You can create a calculated column likeas below:

      NewGrouping = 

      IF(yourColumn = "NPC" || yourColumn = " NPC", "NPC", yourColumn)

    2. Go to Query Editor (Transform Data) in Power BI, then click on your column which has these above values. Right click on it --> Transform --> Trim. This will remove that extra space that you are seeing against "NPC" value.  See below: (I generally follow this transformation step when dealing with TEXT values)

       

       

    Thanks,

    Pragati