Forum Discussion
sakshikaul
5 years agoHelper III
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 ...
- 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.
- You can create a calculated column likeas below:
NewGrouping =
IF(yourColumn = "NPC" || yourColumn = " NPC", "NPC", yourColumn)
- 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
- You can create a calculated column likeas below:
Pragati11
5 years agoSuper User
Hi sakshikaul ,
I see there is a space in NPC value in one instance so there can be 2 ways of fixing this.
- You can create a calculated column likeas below:
NewGrouping =
IF(yourColumn = "NPC" || yourColumn = " NPC", "NPC", yourColumn)
- 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