Forum Discussion

carddosogabriel's avatar
carddosogabriel
Frequent Visitor
2 years ago
Solved

[Help] - Sumx doesn't count the expression correctly

Good afternoon, everyone, what's up?


I am facing the following problem, I would like to add the total of the formula "Sum PoS L4W", however it is not adding up the way I would like, according to the measure "PoS L4W".


In the current month (e.g. 9) - if the volume > 0 in this month (9) it would add 1, if in the previous month (8) the volume > 0 it would also add 1 for the current month (9).


However, as you can see in the image below, this is not happening.

Formulas:


PoS Presence =
IF([Volume Total]>0,1,0)

PoS Presence vs LM =
CALCULATE(IF([Volume Total]>0,1,0),Table[Mes] = MAX(Table[Mes])-1)

PoS L4W =
IF( ( [PoS Presence]  + [PoS Presence vsLM] )>=1,1,0 )

Soma PoS L4W =
SUMX('MTM FRESH WILD',[PoS L4W])





Can anyone help me understand what's going on?

 

  • Hi,

    Does this measure work?

    Soma PoS L4W = SUMX(VALUES('MTM FRESH WILD'[SAP]),[PoS L4W])

    If not, then share the download link of the PBI file.

2 Replies

  • Hi,

    Does this measure work?

    Soma PoS L4W = SUMX(VALUES('MTM FRESH WILD'[SAP]),[PoS L4W])

    If not, then share the download link of the PBI file.