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

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

Reply
Anonymous
Not applicable

Running Total for Measure based on 2 columns not able to calculate

jellayp_1-1655137207399.png

 

IN the above image i need to calculate running percentage for Sum(conti/cost). Sum(conti/cost) is a measure:

 

Sum(conti/cost) = DIVIDE(SUM(Raw_Data_V1[Contingency$]), SUM(Raw_Data_V1[Cost]))
 
Dax Measure used which is not giving expected result
Sum(conti/cost) running total in Close_Month =
var runningtotal = CALCULATE(
    [Sum(conti/cost)],
    FILTER(
        ALLSELECTED('Raw_Data_V1'[Close_Month]),
        ISONORAFTER('Raw_Data_V1'[Close_Month], MAX('Raw_Data_V1'[Close_Month]), ASC)
    ))
Return
if('Measure Tables'[Sum(conti/cost)]=BLANK(),BLANK(),runningtotal)

Need a help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

If you want to get the cumulative total of [Sum(conti/cost)], you can use the following dax:

Measure =
SUMX(FILTER(ALL(Raw_Data_V1),
'Raw_Data_V1'[MonthNumber]<=MAX('Raw_Data_V1'[MonthNumber])),[Sum(conti/cost)])

vyangliumsft_0-1655344070787.png

If the total at the bottom of the table is incorrect, you can use the HASONEVALUE function when creating a dax:

Total is correct =
var _table=SUMMARIZE('Raw_Data_V1','Raw_Data_V1'[MonthNumber],"_value",[Measure])
return
IF(HASONEVALUE('Raw_Data_V1'[MonthNumber]),[Measure],SUMX(_table,[_value]))

vyangliumsft_1-1655344070789.png

If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi  @Anonymous ,

If you want to get the cumulative total of [Sum(conti/cost)], you can use the following dax:

Measure =
SUMX(FILTER(ALL(Raw_Data_V1),
'Raw_Data_V1'[MonthNumber]<=MAX('Raw_Data_V1'[MonthNumber])),[Sum(conti/cost)])

vyangliumsft_0-1655344070787.png

If the total at the bottom of the table is incorrect, you can use the HASONEVALUE function when creating a dax:

Total is correct =
var _table=SUMMARIZE('Raw_Data_V1','Raw_Data_V1'[MonthNumber],"_value",[Measure])
return
IF(HASONEVALUE('Raw_Data_V1'[MonthNumber]),[Measure],SUMX(_table,[_value]))

vyangliumsft_1-1655344070789.png

If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Anonymous
Not applicable

Thank You very much this works !! all the way 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.