Unable to set value/target value of two calculated fields

I created calculated fields that are correctly generating the numerator and denominator of my desired calculation (With one value per row in our table, summed).

However it won’t let me put the numerator over the denominator, whether in its own calculated field or as a value/target value pair.

I keep getting the below error.

The only thing I can think of is that actually the left side data type is an INT, while the right side is a BOOL.

  • But it’s summing correctly (as shown on the top visual) and my value/target value pair are still asking QS to sum the values
  • I cannot find a function that will cast bool to int; and normal sql syntax is not working

Would really appreciate any help.

Edit your dataset and click on the three dot menu to the right of the field name. From there you can select ‘Change data type’ and you should be able to select INT.

1 Like

I’m not getting the option for “Integer” / “String” / “Date” - only the geospatial types

I think you need to scroll or reformat your screen to show those types. It might just be hidden above the header.

Hi @shohini! Checking in. Did this question get resolved? If you still need assistance, please respond to this topic. Thanks!

I didn’t but I basically created a new dataset that would have the right data types and formats via SQL query which solved my issue.