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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
RCHANG44
Frequent Visitor

SUMX not calculating expected sum values

Hi, I am trying to use SUMX to get total mkv by summing up all multiplication of a measure ('adj factor') and a column ( __mkv). However, as shown in the screen shot, it looks it calculates the sum value first and then times 'adj factor' after. I expect to get same total mkv in the same date. Any advice on how to get correnct sum, please?


my formula: SUMX(ALL(myTBL),myTBL[ __mkv]*[adj factor]) where [adj factor] is a measure,
VAR adj factor =CALCULATE(1/(1+(EXP((-1)*_Zscore)))

sumx.PNG

3 REPLIES 3
RCHANG44
Frequent Visitor

Hi @selimovd ,

Here is my DAX code, thanks:

total mkv =
VAR Score_Avg =
CALCULATE(AVERAGE(MyTBL[_score]),ALLEXCEPT(MyTBL,MyTBL[Date]))
VAR Score_Std =
CALCULATE(STDEV.P(MyTBL[_score]),ALLEXCEPT(MyTBL,MyTBL[Date]))
VAR _Zscore =
CALCULATE(
(sum(MyTBL[_score]) - Score_Avg)/Score_Std,
KEEPFILTERS(
FILTER(ALL(MyTBL_[_score]), MyTBL[_score]<>BLANK())
)
)
VAR _Sigmoid =
CALCULATE(
1/(1+(EXP((-1)*_Zscore))),
KEEPFILTERS(
FILTER(ALL(MyTBL[_score]), MyTBL[_score]<>BLANK())
)
)


RETURN

SUMX(ALL(MyTBL),MyTBL[ __mkv]*_Sigmoid)

Hey @RCHANG44 ,

 

thank you for the measure.

As we don't have the data model and the tables, I still didn't really figure out what the problem is and how the result should look like? Could you maybe give more details?

 

Best regards

Denis

selimovd
Super User
Super User

Hey @RCHANG44 ,

 

can you post the real DAX code you are using?

 

Thank you and best regards

Denis

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.