How to add a filter based on the values from an aggregated field?

I am trying to add a calculated filed with a text, based on the aggregated value from a column.
Refer the image below for the dataset format.

  • I added a calculated field called Launches —> ifelse(Type=‘Launch’,1,0)

Help needed in:

  1. The field called Flag has to be added based on Launches, where if the particular User has launches anywhere, we need to flag each entry as stated below.
  2. Also, we should be able to add the field ‘Flag’ as a filter to get all entries of only those users who have launches

Kindly assist.

Untitled

Hi @sreyesh
you should add a filter for the “flag” field as for all other fields as well.
BR

How do i add the Flag field using an aggregation?

maybe

sumFlag

sumOver
(
     sum("calculated field), 
     [User]
)

flag
ifelse(sumFlag>0,1,0)

Thank you, reached till here successfully.
However, on trying to add a filter using this newly created Flag field.
I am receiving following error.

image

Anyone got an idea for this?

Maybe you can try the solution

Hi @sreyesh,

Can you try this?

Use sumOver with PRE_AGG to calculate the number of launches per user.
Launch count = countOver(ifelse(Type = ‘Launch’, Type, null), [User], PRE_AGG)

Then filter by by launch count >= 0.

Hi Erik,
Thank you for this suggestion.
This worked for one visual but resulted in the following error for other visuals.

image

Hi David,
Thank you for the suggestion.
However, this gave the following error as well.
image

Hi @sreyesh,

Ae you using PRE_AGG with the countOver? Can you share a screenshot showing your field wells?

Apologies, won’t be able to share.
I will try to make changes in the query to resolve this.

Thank you, anyway!