Hi all,
I've currently got a formula that is working fine, it finds the average salary of a table based on both job title and job location, but if it returns an error (for instance, user selects a location that doesn't have that job, the formula simply returns the average salary of that job in all locations.
However, since the table to be presented to the end user doesn't have the job title or location selected yet, all of the unfilled cells are returning with the #div/0 error. One easy fix is to just go in and select random drop downs, but is there an easy way to tweak the below formula so that it returns no value unless title and location are selected, at which point the formula would kick in. I just don't like to look at the #div/o, and would prefer to not do so.
Thanks so much,
Ernie
=IFERROR(AVERAGEIFS(Table2[Annual Salary],Table2[Job Title],[@[Job Title]],Table2[Location],[@Location]),SUMIF(Table2[Job Title],[@[Job Title]],Table2[Annual Salary])/COUNTIF(Table2[Job Title],[@[Job Title]]))
I've currently got a formula that is working fine, it finds the average salary of a table based on both job title and job location, but if it returns an error (for instance, user selects a location that doesn't have that job, the formula simply returns the average salary of that job in all locations.
However, since the table to be presented to the end user doesn't have the job title or location selected yet, all of the unfilled cells are returning with the #div/0 error. One easy fix is to just go in and select random drop downs, but is there an easy way to tweak the below formula so that it returns no value unless title and location are selected, at which point the formula would kick in. I just don't like to look at the #div/o, and would prefer to not do so.
Thanks so much,
Ernie
=IFERROR(AVERAGEIFS(Table2[Annual Salary],Table2[Job Title],[@[Job Title]],Table2[Location],[@Location]),SUMIF(Table2[Job Title],[@[Job Title]],Table2[Annual Salary])/COUNTIF(Table2[Job Title],[@[Job Title]]))