PQL substraction (a-b)


I’m trying to calcul the difference between to column in the same OLAP table. I used this formula :

but the system alway run… he never give me a results why ?

If it’s not giving an error it might just take a wile?

Might help to aggregate or at least filter the output/component.

I’m also wondering about the ‘{’ and ‘}’ notation, fur us (CPM 4.5 on premise) we need to use ’ around table and column names.

Hi, when i’m using the title of the column without the ‘{’ and ‘}’ I receive an error.

Thanks for the help.

You need to use the STR_TO_INT() function to convert the values to Integers rather than String values. You cannot do mathematical calculations on strings.

1 Like

When I put this formule, i’ve no result, the column become empty. Why ?

Hi Audrey,

the STR_TO_INT function returns null, if the input is not a number.
My solution for that would also to cast the numbers which are loaded as strings with the STR_TO_INT function so that they can substracted.