Forum Discussion
How to do INDEX(MATCH() or XLOOKUP() with nested OR()?
- Jul 16, 2021
Jpalaci1 i'm sorry but maybe I'm still not following. Why not just use the "linking Account" in the XLOOKUP instead of the created Key?
=XLOOKUP([@[Linking Account]],Table2[Linking Account],Table2[Linking Account Name])
or if you only want to 'fall back' to that less specific match condition then add a second xlookup in that if_not_found criteria like this:
=XLOOKUP([@[Created Key]],Table2[Created Key],Table2[Linking Account Name],XLOOKUP([@[Linking Account]],Table2[Linking Account],Table2[Linking Account Name]))
the problem is that in your simple example both give the same results (the first I put in col E and the latter I put in col F)
I can't suggest a variant to your solution because you started with a solution you are implementing without showing us the sample of the original dataset. Your solution might get you on the right track or it might not, but without seeing the sample of original dataset and what you're trying to accomplish or to suggest an alternate solution or angle I cannot begin to think of it as you started your question with the solution you are trying to make work.
If you could show a sample of the original dataset and explain to us what your desired/expected outcome might allow us to suggest a variant. From what I can gather from the conversation, a power query + data model with set table data relationships + power pivot path might be a good variant, but then again I do not know what the original dataset looks like and I do not know what your expected results are.
- Jpalaci1Jul 17, 2021Brass ContributorI can’t share the original but I worked through before my last post to see if it works the exact same way and it does.
The example data I have hear follow the same logic to complete what I need done.