Hello,
I do not understand why I have 0 as a result of a division.
I created the dashboard to help the debbuging.
I tried also to do num/den as test but still something is wrong…I tried to change the format but still nothing, any idea?
thank you
Hello,
I do not understand why I have 0 as a result of a division.
I created the dashboard to help the debbuging.
I tried also to do num/den as test but still something is wrong…I tried to change the format but still nothing, any idea?
thank you
Hi @remba87
The formula you provided seems to give a result of 0
because it is likely being applied row by row and no single row satisfies the conditions of multiple ifelse
statements simultaneously. In your dataset, each q_rubrik
has a specific value, so the formula does not find the necessary conditions within a single row, resulting in zeros for each operation.
To resolve this issue, you need to aggregate the values across the dataset instead of evaluating them row by row using sumIf
function.
Example:(Syntax may vary - Adjust the field name from your dataset)
(
sumIf({q_antal}, {q_rubrik}='@antalBelagdaPall120')
+
sumIf({q_antal}, {q_rubrik}='@antalBelagdaPall180')
)
/
(
sumIf({q_antal}, {q_rubrik}='@antalPlatser120')
+
sumIf({q_antal}, {q_rubrik}='@antalPlatser180')
)
Please refer the below documentation this might be helpful for you.
Hello, it works thank you.
I do not understand why the nom and den were working…if it was row by row, also that one should not have worked no?
Hi @remba87
Num and Den calculation are satisfied with only one row as per your dataset, that’s the reason its returning the value.
The formula(calculated field) does not aggregate or sum the values across multiple rows. It operates row by row, which is why it might not behave as expected unless used in a context where you sum the results afterward. If you want the total sum across the dataset, you need to use aggregation functions like sumIf
, as I suggested earlier.