distinctCountOver using date parameters and pre_filter

Hi! I have a pivot table in my dashboard where one column has the distinct count with a filter applied, and I need to add another column in the same pivot table where that distinct count does not have that filter applied. I want to be able to see the two values side by side to compare.

I was able to get it to work using this calculation:
distinctCountOver(AircraftRegistrationNumber, [OperatorICAOCode], PRE_FILTER).

However, I need to be able to apply the date parameters. When I add in the date parameters, I get syntax errors. Here’s what I have:

distinctCountOver(ifelse(({TakeoffDate}>=${pTakeoffDateStart} AND {LandingDate}<=${pTakeoffDateEnd}), {AircraftRegistrationNumber}),[{OperatorICAOCode}], PRE_FILTER)

Thank you.

Hi @LBerry

Can you share the error screenshot ?

Also, please try to implement same calc in two parts. First by doing Ifelse and using that in distinctCountOver calc. Let me know if this works

Hi @Ashok,

Thank you for your reply. Here is a screenshot of the error.

I’m not sure I understand your suggestion for implementing in two parts. Could you give me an example? Thank you.

I was able to get it to work by changing the date parameter. Thank you.