Forum Discussion
Kumshan450
Helper III
6 years agoDAX function to replicate Excel Index Match and Count if Function
I have address data. I want to find whether certain keyword in address field matches with the list mentioned in the negative Area. I applied below formula in excel file: =IFERROR(INDEX(Sheet2!$C$2:...
- 6 years ago
Your DAX attempt is missing the PINCODE part.
I think this should work, but not sure it's the most efficient solution:
NegativeArea = CALCULATE(FIRSTNONBLANK(NegativeArea[Address],NegativeArea[Address]),FILTER (NegativeArea,CONTAINSSTRING(AddressData[Address],NegativeArea[Address]) && CONTAINSSTRING(AddressData[Address], NegativeArea[PINCode]))) - 6 years ago
Kumshan450
Helper III
6 years agoHi,
The logic is area+Pin code both should match.
For Eg, if you check Vishal Nagar as Negative Area.
In the address data worksheet, there are two loan accounts where the address contains Vishal Nagar. If I apply only by column c then the second loan will also get matched up which I don't want as PIN code is different. So PIN code is mapping is required in the formula.
| Loan No | State | Branch | Address | NegativeArea |
| 655 | Rajasthan | Jaipur | Gali No 5 Janta Dal Colony Vishal Nagar Vishal Market Jaipur 511202 | Vishal Nagar |
| 329 | Maharashtra | Pune | Sector 08 Vishal Nagar Vishal Market Jaipur 411252 |
Ashish_Mathur
Super User
6 years ago