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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
WiseFennec
Frequent Visitor

Sumx not working properly.

Hello

 

I am working on a measure to calculate the gross sales of our products, below my measures :

G_TMS_LE = SUMX(F_TMS_Fcst,F_TMS_Fcst[TMS_Prices]*F_TMS_Fcst[TMS_LE])
G_TMS_LE_B = F_TMS_Fcst[TMS_Prices]*F_TMS_Fcst[TMS_LE]
 
The correct measure should be the first one, but it's working for the month of August and not July ?
WiseFennec_0-1693556909037.png

Thanks in advance for your help

1 ACCEPTED SOLUTION

Hello

 

thanks for your answer 

 

I solved the issue :

 

the code for the measure TMS_LE] is as below

TMS_LE = SUM(A_TMS[A_TMS]) + SUM(F_OOR[F_OOR]) + SUM(F_TMS_Fcst[F_TMS_Fcst])

 

I checked the data for each table and found that the measure G_TMS_LE is not working for the lines where F_TMS_Fcst is null, even though TMS_LE is working 

 G_TMS_LE = SUMX(F_TMS_Fcst,F_TMS_Fcst[TMS_Prices]*F_TMS_Fcst[TMS_LE])

 

Replacing null by 0 made the trick. I should have known this but I am still a novice 😛

 

 

View solution in original post

2 REPLIES 2
mlsx4
Memorable Member
Memorable Member

Hi @WiseFennec 

 

Are you sure you don't have any kind of filter by month?
Try: G_TMS_LE = SUMX(VALUES(month), F_TMS_Fcst,F_TMS_Fcst[TMS_Prices]*F_TMS_Fcst[TMS_LE]))

But I don't know if it is the problem. Can you provide sample data?

 

Hello

 

thanks for your answer 

 

I solved the issue :

 

the code for the measure TMS_LE] is as below

TMS_LE = SUM(A_TMS[A_TMS]) + SUM(F_OOR[F_OOR]) + SUM(F_TMS_Fcst[F_TMS_Fcst])

 

I checked the data for each table and found that the measure G_TMS_LE is not working for the lines where F_TMS_Fcst is null, even though TMS_LE is working 

 G_TMS_LE = SUMX(F_TMS_Fcst,F_TMS_Fcst[TMS_Prices]*F_TMS_Fcst[TMS_LE])

 

Replacing null by 0 made the trick. I should have known this but I am still a novice 😛

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.