dna
November 1, 2023, 8:33pm
1
I am new to quicksight and want to calculate number of repurchasing guests in menu_item_name that is count of distinct account_id who purchased the menu_item_name more than 1.
the below formula is giving me wrong result:
ifelse(countOver({account_id}, [{account_id},{menu_item_name}], PRE_AGG) > 1, 1, NULL)
ErikG
November 1, 2023, 8:43pm
2
Hi @dna
What if you start to check thebl countOver part in a separate calculated field and see what the numbers are?
BR
dna
November 1, 2023, 10:10pm
3
I did not get it. Would you please elaborate?
ErikG
November 2, 2023, 3:07am
4
Can you create a calculated field with just
countOver({account_id}, [{account_id},{menu_item_name}], PRE_AGG)
to see if that calculation is right. So you can see if e.g. the partition is set right.
Jesse
November 2, 2023, 5:06pm
5
Hi @dna - can you try this (assuming you have some column that is unique for each purchase, which Im referring to as ‘order id’ here):
ifelse(distinct_count({order id}, [customer, product])>1, 1, 0)
Then Sum that when you add it to your visual.