Total computing incorrectly

The row-totals make no sense. For context these are both Decimal calculated fields. Can anyone explain why this is happening. Many thanks.

@Mikael_Maingard - Are these 2 fields calculated fields? Can you please share the calculation details and their corresponding aggregation? That would help to understand the scenario better. Thank you!

1 Like

Hi @sagmukhe, thanks for your response. For context, the dataset is Users - Members (left join).

Yes, they are both calculated fields.

  1. userToMemberConversionNumerator = ifelse(memberId=NULL, 0, ifelse(distinct_count(userId)=1, 1, 1/distinct_count(userId)))

  2. totalUsers = distinct_count(userId)

@sagmukhe, any thoughts?

@Mikael_Maingard - Sorry, I could not get a chance to look at it before. By any chance, can you please provide me a sample snapshot of the base dataset columns, having these columns i.e. memberID, userID etc. Also, if possible, please share the expected values of the output columns as well based on your sample dataset. This seems to be a problem of aggregation level in the calculations. I am just looking for this so that I can replicate it at my end. Thank you!

Hello @Mikael_Maingard - Sorry for the delayed response. Thank you for sharing the details. I have tried to replicate the scenario at my end. I believe you can create a calculated field and that should be enough to get what you want. Please see the below reference snapshot where I tried it out based on an example dataset. Let me know if this helps!

The Calculated Field “Usershavingmembers” will give you the total number of (unique) users that have at least 1 non-null membership; whereas the count distinct of user id will give you the total number of (unique) users.

Did my suggestion help you in resolving your query? If yes, would request you to mark the post as “Solution”. This will help the community to find guidance and answers to similar question. Thank you!