Forum Discussion
Adding specific vales to a filtered table
- Anonymous5 years ago
hi, for this specific case, you could create a calculate column in PowerBI with the next formula:
Region2 = IF( OR('Customer Table'[Region] = "North America",
OR('Customer Table'[Customer Name] = "Customer Nmae 7",
'Customer Table'[Customer Name] = "Customer Nmae 8")
),"North America",'Customer Table'[Region])You also can create a flag column based in 'Customer Name' Column, and then create a formula with the region and flag column.
Customer Name | Region | Flag (Based on Customer Name)
Customer Name 1 | North America | 0
Customer Name 2 | North America | 0
.
.
Customer Name 7 | Mexico | 1
Customer Name 8 | Mexico | 1
Customer Name 9 | Mexico | 0
Customer Name 10 | Mexico | 0
Region 2 = If( OR('Customer Table'[Region] = "North America", 'Customer Table'[Flag] = 1),
"North America", 'Customer Table'[Region])
Regards
Anonymous I'm suggesting adding a column in PQ, not in the database, and most of the time it is a good idea to create views in the backend and have that logic go in the view.