Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
3 years ago

INCORRECT SUM

Hello good morning, I have the following table, all are measures, AC Fernando throws me values calculated by a switch, however the sum is wrong, as I can solve help please, I do not know how to solve it, this is the code of the measure:

CF FERNANDO =
SWITCH(
TRUE(),
[% FERNANDO]<70, 0,
[% FERNANDO]<80, [VentasTotales]*0.07,
[% FERNANDO]<90, [VentasTotales]*0.08,
[% FERNANDO]<100, [VentasTotales]*0.09,
[% FERNANDO]<110, [VentasTotales]*0.1,
[% FERNANDO]<120, [VentasTotales]*0.110,
[% FERNANDO]<1000, [VentasTotales]*0.120
)

and the measure AC FERNANDO

AC FERNANDO =
CALCULATE(
[CF FERNANDO], FILTER(C_PRODUCTO, [CF FERNANDO]>0)

1 Reply