Does string comparison work in version 2.8.13 ? I’d like to use something like :
If (Column1 == ‘Apple’, count(“Column1”), 0)
Thank you for writing to us.
Our team would like to kindly explain that comparing string members in the calculated value formula is not supported. This is because, by design, the calculated value functionality was intended for values, not hierarchies.
Please let us know if you have any other questions.
Thank you for your answer,
Ok, then as a Workaround, I guess I can replace string values by integer, for instance “Present” > 1, “Absent” > 0, “Other” > 2 ?
I tried to test a calculated value formula on numerical values, but I can’t get it to work…
My table contains a column ‘Age’, and some values are ’19’ (image 1 in the attached file), in the floating point number format.
However, I do not manage to count thoses values. I’ve tried the following formula :
if(“Age” == 19, count(“Age”), 0) => returns “0” (see image 2, 3, 4 in the attached file)
Even if I remove the “Période” parameter as “Rows” (“Lignes” in my language) (see image 5), if(“Age” == 19, count(“Age”), 0) returns “0” (see image 6).
Can you tell me how to be able to count a recurring numerical value ?
We want to confirm that you can replace string values with associated numbers as a workaround.
The issue you are facing can be resolved by setting
individual property of the calculated value to
true. This parameter defines whether the formula is calculated using raw values or using aggregated values. In your case, raw values should be used. Otherwise, Flexmonster will sum “Age” first, and apply the condition afterward.
Here is a JSFiddle for demonstration: https://jsfiddle.net/flexmonster/wr8yhpz1/. You can configure it using UI by selecting “Calculate individual values” option or “Calculer les valeurs individuelles” with localization applied.
Please let us know if it helps.
Looking forward to your feedback.
What about booleans? If I convert “Yes” and “No” to booleans, would this work?
Let’s say I have data similar to the following:
I would like to map the percentage of “passed_exam” by name. How can this be done?
Name: Pass rate
Thank you for your question.
Currently, Flexmonster supports only number comparisons in calculated value formulas.
Still, it is possible to achieve the desired output without applying comparisons.
First, we suggest converting
or adding a numeric representation of the field that will be used for the calculations:
Next, our team suggests one of the following approaches:
"Pass Rate" output can be achieved by applying an
Here is a JSFiddle example: https://jsfiddle.net/flexmonster/083myjgL/.
"sum('passed_exam') / count('passed_exam') * 100"
We have prepared a JSFiddle for illustration: https://jsfiddle.net/flexmonster/fh3raLt8/.
We hope this helps! Feel free to reach out should any additional questions arise.