Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
learner03
Post Partisan
Post Partisan

If statement for matching text from other table list

I have 2 Tables-

I need to write a measure or create a column for if the Location is India and count less then 10 and postcode belong to the postcode list, then Count*50. ( to be notes that in actual data, the postcode lis is  more than 500)

1) Order

Order No Location Count Postcode
abc India 5 1239
def India 10 3145
xyz USA 4 1254

 

2) Postcodes

POstcode Location
1235 India
1236 India

1237

India

1238 India
1239 India
1210 USA
1214 USA
1243 USA
1254 USA
1 ACCEPTED SOLUTION
ChainsawMan
Frequent Visitor

Hi 

Please try the following DAX to create a new column.

Column = IF(
    'Order'[Count]<10 && 'Order'[Location] = "India" && 'Order'[Postcode] in VALUES(PostCode[Postcode]),
    'Order'[Count]*50,
    'Order'[Count]
)

View solution in original post

2 REPLIES 2
ChainsawMan
Frequent Visitor

Hi 

Please try the following DAX to create a new column.

Column = IF(
    'Order'[Count]<10 && 'Order'[Location] = "India" && 'Order'[Postcode] in VALUES(PostCode[Postcode]),
    'Order'[Count]*50,
    'Order'[Count]
)

@ChainsawMan  Thanks . and what is the opposite of this, example NOT In values?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.