Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
carddosogabriel
Frequent Visitor

[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])



carddosogabriel_0-1700248786897.png

Can anyone help me understand what's going on?

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
carddosogabriel
Frequent Visitor

Works!!!! Thank Youu Ashish_Mathur

 

Ashish_Mathur
Super User
Super User

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.