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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.