Custom Aggregated field - Not supported as dimension

Hey guys, So I’ve looked into multiple QnAs for an answer but nothing really worked so far. Here is the problem statement- I’m trying to Identify Employee count who Scored >=90% .Here, the numerator has a test condition = “Acheived”, and denominator would be count of all tests. I attempted using the formula below -
ifelse(ifelse({test_result}=‘Achieved’,distinctCountOver(
{TEST_ID},[{STAFF_NAME},{TEST_RESULT}],PRE_FILTER),0)/
distinctCountOver({TEST_ID},[{STAFF_NAME}],PRE_FILTER)>=0.9,“Pass”,“Fail”)

It does the job for the most part BUT it won’t take into account multiple filters applied to the visual such as time frame(by month/quarter), geo location, etc. It takes the default percentage of the entire dataset attributed to an employee, which doesn’t help at all! Eg: An employee has 20 rows and half are from the previous quarter, and despite filtering for the current quarter it takes the whole data by default :confused:
FYI there are about 7 different conditions applied to all charts and they have their own issues
Any suggestions?

Hello @Ops_Expert !

If I understand your use case, would it be possible to add more logic to your ifelse statement to account for the date filtering?

You could create a start and end date parameter and then apply the following logic:

{date_field} >= ${StartDate} AND {date_field} <= ${EndDate}

You would then use those start and end date parameters to filter your data. Let me know if that helps!

Thanks for the response. I notice the final result somehow always overrides the dashboard filters, probably because of PRE_FILTER.
Since, I won’t be needing this measure for now. I’ll mark this as complete!