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 trated as a single value
so how to manage this?
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:
1 Reply
- Pragati11Super 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
- You can create a calculated column likeas below: