Mar 19 2022 02:48 AM
Hello Excel Community,
I am wondering if someone could advise on how to use Xlookup with Median + IF function together?
I tried this formula: =XLOOKUP(A7,Table7[Country],MEDIAN(IF(Table7[Source]=Citeline)Table7[RR]) but unfortunately it did not work and I don't understand where I made mistake.
It would greatly help if there's a formula so I don't need to look up each value for each country individually, thank you.
Thanks so much,
Amy
Mar 19 2022 03:02 AM
You have already asked a similar question and got some answers:
Mar 19 2022 03:17 AM - edited Mar 19 2022 03:20 AM
Solution@AmyYang I didn't bother to look at any of the previous questions and answers, but this one seems to do what you asked for.
In B7:
=MEDIAN(FILTER(Table1[RR],(Table1[Source]="Citeline")*(Table1[Country]=[@Country])))
And a similar one in C7. just change "Citeline" to "Q2Labs".
Edit: Note that the Table you refer to as "Table2" is actually called "Table1". And the formula you have problems with refers to a Table7 that doesn't exist. Not in this sheet in any case.
Mar 19 2022 08:39 AM
Mar 19 2022 08:40 AM
Mar 19 2022 03:17 AM - edited Mar 19 2022 03:20 AM
Solution@AmyYang I didn't bother to look at any of the previous questions and answers, but this one seems to do what you asked for.
In B7:
=MEDIAN(FILTER(Table1[RR],(Table1[Source]="Citeline")*(Table1[Country]=[@Country])))
And a similar one in C7. just change "Citeline" to "Q2Labs".
Edit: Note that the Table you refer to as "Table2" is actually called "Table1". And the formula you have problems with refers to a Table7 that doesn't exist. Not in this sheet in any case.