Forum Discussion
Multiple IF ELSE across two tables
- 4 years ago
Hi, mohsenask
You can use the LOOKUPVALUE function to help you.
I have to say that the company names in your tables are not the same, which makes me keep my formula continuously failing.
And the case of the fields in the table is best to be the same, you can transform the case of the field in PowerQuery.
Okay, what we have to do next is to create a calculated column as follows:
Column = VAR _A= LOOKUPVALUE( M_fees[PERC_AMT], M_fees[COMPANY NAME],All_Fees[MetadataCompany], M_fees[BRAND_ID],All_Fees[card_ brand], // M_fees[IS_Premium],All_Fees[IS._Premeium] M_fees[IS_ PREMIUM],All_Fees[C. _Premium] ) VAR _B="IF A = BLANK THEN B ELSE A" RETURN _A // The value of VALUE column in M_fees table is blank, if you want just blankvalue, you don't need the VAR _BResult:
Since the data above doesn't have a value that can be matched so I added four extra rows.
And in your table, if you want to do it with a measure, it would be helpful if the Boolean value can be converted to 0 and 1. You can change your source data, or add a calculated column to display the Boolean value as a number.
The calculated column looks like this:
IS._Premeium = [C. _Premium]+0Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.