Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Regards,
I have the following: In a simple table with 3 dimensions and 3 expressions,The three dimensions are values of Technology, Area and product.The three expressions are the goal to produce, PRODGOAL = I use an (if) to not add the zero values. PRODUCED = The sum of what is produced per day. PERCENT = division between (PRODUCED / PRODGOAL)
The calculation is done well, but having the total of the column, this result does not add up, it is not expected.
5940/7112 = 63% this bad must be 83%
If PRODGOAL (Produced = 0, 0, sum (PRODGOALS))
PRODUCED = Sum (QTYGOOD)
PERCENT = (Produced / PRODGOAL)
Try this
PRODUCIDO/
Sum(Aggr(
If(Sum(QTYGOOD) = 0, 0, Sum(PRODGOALS))
, XnAreaDes.., WRKCTRID, ITEMID))
From the image, I couldn't determine the name of your first dimension, but you need to use that within the Aggr() function.
@JesusAlv4 Are you using QlikView or Qlik Sense? I would like to move this into the correct product forum.
Sorry Sue, it is a Qlikview product, and change the label to the correct forum, thanks.
What exactly are your expressions for the three columns? Are you using column reference for PRODGOAL expression?
Hello Sunny,
With IF sentence, I change the value to ZERO, so that it does not add up to the total production goal.
If (PRODUCIDO = 0, 0, Sum(PRODGOALS))
when I remove those rows of ZERO the calculation of percentage is not correct
example image, 2337/1778 = correct percent 131% not 99%
What is your expression for PRODUCIDO column?
The expression is:
PRODUCIDO = Sum (QTYGOOD)
and
PERCENT = (PRODUCIDO / PRODGOAL)
Try this
PRODUCIDO/
Sum(Aggr(
If(Sum(QTYGOOD) = 0, 0, Sum(PRODGOALS))
, XnAreaDes.., WRKCTRID, ITEMID))
From the image, I couldn't determine the name of your first dimension, but you need to use that within the Aggr() function.
Thank you,
It works correctly, best regards.