Incorrect Grand Total using distinctcountif/sumover

Hi,
Trying to get the rate of NZ country transactions over all transactions but quicksight is printing blank grand total.
transactions = distinct_countIf({row_id})
transactions = distinct_countIf({row_id}, {country} = ‘New Zealand’) / sumOver(distinct_count({row_id}))

image

Thanks, Tin

Hello Tin,

  • Totals and subtotals are blank for table calculations on metrics aggregated by distinct count.

You can use countIf instead of distinct_countIf if your row_id will be unique per row.

1 Like

@meerab row_id is not unique field in dataset that’s why we are using distinct_countif. Is there any other way?

Hi @ctine, what do you expect the total number to be calculated? adding up all the percentages from the table?

1 Like

Hi @ctine

We have not heard back from you regarding your question. We would still like to help. If we do not hear back in the next 3 days, we will archive the question.