sreyesh
November 22, 2023, 11:16am
1
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:
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.
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.
ErikG
November 22, 2023, 11:18am
2
Hi @sreyesh
you should add a filter for the “flag” field as for all other fields as well.
BR
sreyesh
November 22, 2023, 11:19am
3
How do i add the Flag field using an aggregation?
ErikG
November 22, 2023, 11:30am
4
maybe
sumFlag
sumOver
(
sum("calculated field),
[User]
)
flag
ifelse(sumFlag>0,1,0)
sreyesh
November 22, 2023, 11:46am
5
Thank you, reached till here successfully.
However, on trying to add a filter using this newly created Flag field.
I am receiving following error.
sreyesh
November 29, 2023, 9:03am
6
Anyone got an idea for this?
ErikG
November 29, 2023, 9:48am
7
Maybe you can try the solution
Hi @Cristina_Aviles_de_C
i just was to finish my sentence and had a final idea.
Key was the “custom filter list”
Could you try so create the filter for “Best Seller”, change it to “Custom filter list”,
[grafik]
add to sheet and define the “specific values”
[grafik]
BR
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.
sreyesh
November 30, 2023, 5:59am
9
Hi Erik,
Thank you for this suggestion.
This worked for one visual but resulted in the following error for other visuals.
sreyesh
November 30, 2023, 6:06am
10
Hi David,
Thank you for the suggestion.
However, this gave the following error as well.
Hi @sreyesh ,
Ae you using PRE_AGG with the countOver? Can you share a screenshot showing your field wells?
sreyesh
November 30, 2023, 6:30am
12
Apologies, won’t be able to share.
I will try to make changes in the query to resolve this.
Thank you, anyway!