Calculated field question counting datetime and strings as numbers

Hello all!

I am trying to divide the number in the “Oferentes” column by the “Procesos” column. The “oferentes” is a ‘countdistinct’ of a datetime field, and the “Procesos” is a countdistinct of a string field. When I go divide oferentes/procesos, I get the error that I can’t divide a datetime by a string (duh!). So how can I make it so that QuickSight understands that I want to divide the numbers? I tried changing to measure but it didn’t work.

Thanks!

EH
Screenshot 2023-12-29 at 12.23.17 PM

Hi @hdezeduardo

Could you try writing calculated field like below using count_distinct function

Thanks
VInod

1 Like

Hi @hdezeduardo -
Did Vinod’s suggestion solve your issue or did you find your own solution? If not, please let us know how we can help further?

Best Regards,
Kellie

1 Like

This worked, thank you! New level unlocked!!