Flexmonster MCP Server is here! Connect your ✨AI assistant to our documentation. Get started
+

Formula

Resolved
Toni Veintimilla Jose Antonio Veintimilla asked on February 8, 2018

Good Morning.

I have to calculate a percentage based on given values. I send you code extract. It is not working for me. I do not know if it's a parenthesis problem or that I'm not using the formula's options correctly:
measures: [
                         { uniqueName: "CUPS", aggregation: "count", active: true },
                        { uniqueName: "finalizadas", caption: "Finalizadas", aggregation: "sum", active: true },
                        { uniqueName: "anuladas", caption: "Anuladas", aggregation: "sum", active: true },
                        { uniqueName: "Progreso", caption: "Progreso", formula: "((sum('finalizadas') + sum('anuladas')/100)*count('CUPS')", active: true },

Can you help me with this topic? It is crucial for the progress of the project.

5 answers

Public
Ian Sadovy Ian Sadovy ⋅ Flexmonster ⋅ February 8, 2018

Hello Jose,
 
Thank you for the question.
Your formula looks correct, and it seems working for me. Please take a look at the following sample, it has different measures, but still, the formula is the same: ((a + b) / 100) * c - http://jsfiddle.net/flexmonster/1fvs863v/
Or do you mean that some values appear, but you expect them to be calculated differently?
 
Regards,
Ian
 

Public
Toni Veintimilla Jose Antonio Veintimilla ⋅ February 8, 2018

Thank you very much.

I have detected the error. In the formula the value of count ('CUPS') does not have to be the value of the row. I have to get the total value of the count column ('CUPS').

How do I trade against the total value of the column?

Thank you very much.

Public
Toni Veintimilla Jose Antonio Veintimilla ⋅ February 8, 2018

Hi.

How do I comment? I send you (attached) an example of how I need the formula to be. Because it's a bit urgent. I have a presentation tomorrow Friday and I would like to have the calculated column mounted.

Attachments:
example.png

Public
Toni Veintimilla Jose Antonio Veintimilla ⋅ February 8, 2018

Sorry. Solved.

Public
Tanya Gryshko Tanya Gryshko ⋅ Flexmonster ⋅ February 9, 2018

Hello, Jose,
We are glad to hear your question is solved.
Regards,
Tanya

Please sign in or register to submit your answer