How to show tech rank after filtering down to individual level

Hi,
I’m trying to show a tech’s rank compared to the rest of the team during a time period that is controlled by the user(parameter). I noticed a similar thread showing how to display rank/% of group after filtering When I get to step 2 I run into an error saying it can’t be aggregated. I was wondering if this is do to the date parameters I have inserted or if there is something else going on? Thanks

What is your calculated field now in step 2?

If you’re using a parameter as a date then there would be no order because that parameter is all the same. I would maybe look to do a dateDiff of the parameter and your date_field. That would give you days from the parameter which you can sort on.

Here is my first calculated field to calculate number of items (c_cases_in_period)
sumOver(
ifelse((${Startdate} <= {date_at}) AND ({date_at} <= ${EndDate}), 1, 0),
[{tech_id}],
PRE_FILTER
)

Here is step 2
rank(
[min(({c_cases_in_period})) DESC],
,
POST_AGG_FILTER
)

When I use PRE_FILTER for the second calculated field I get an error saying it fails because c_cases_in_period is aggregated

Why do you need to aggregate it to the min? That will not work.

Can you take out the min?

rank(
[{c_cases_in_period} DESC],
,
POST_AGG_FILTER
)

Using min it actually gives me the correct rank. When I remove it the rank is off and the ranks are skewed to being over a thousand which isn’t correct.

Can you try and wrap it in a minOver?

rank(

[minOver(min({c_cases_in_period})) DESC],

,

POST_AGG_FILTER

)

This might not be the correct calculation but you can wrap it in a LAC-W function. Using level-aware calculations in Amazon QuickSight - Amazon QuickSight