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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
darkobrown
Regular Visitor

Sum of remaining SP until a specific date

So I need to create a burndown report. 

 

The problem I have is that the SUM does not work as I want it to. 
I have 2 tables: 

change_history_SP:

darkobrown_0-1684932797109.png

Here the changes in the fields are stored. 

and a Datetable:

darkobrown_1-1684932870300.png

here is the formula I use to get the sum for 'Remaining SP' :

 

Remaining SP = 
CALCULATE (
        SUM(change_history_SP[Only1ValueperDay Remaining Sp]),
        FILTER (
            ALL ( change_history_SP ),
            change_history_SP[created] <= EARLIER ( [Date] )
        )
)

 

 

 

As you can see in the change_history_SP table on april 25,2023 the value changes from "31" to "23" 

What I want to happen in the table 'Date' in the Column 'Remaining SP' that until April 25 in every day it says 31. And on april 25,2023 it should change to 23. What happens instead is it calculated 31 + 23 and so after april 25,2023 it says  54. 
How can I achieve that it says 23 after april 25,2023? 

2 REPLIES 2
v-eqin-msft
Community Support
Community Support

Hi @darkobrown , 

 

Here are the steps you can follow: 

 

1. Create calculated column. 

 

IF =  
IF( 
   'Table'[Date] in SELECTCOLUMNS('change_history_SP',"Date",[Created]) , 
1,0) 
Group =  
SUMX( 
    FILTER(ALL('Table'), 
    'Table'[Date]<=EARLIER('Table'[Date])),[IF]) 
Flag_Value =  
var _value= SUMX( 
       FILTER(ALL(change_history_SP), 
       'change_history_SP'[Created]=EARLIER('Table'[Date])),[Only1ValueperDay Remaining Sp]) 
return 
IF( 
    _value<>BLANK(),_value,0) 
Column =  
SUMX( 
    FILTER(ALL('Table'), 
    'Table'[Group]=EARLIER('Table'[Group])&&'Table'[Date]<=EARLIER('Table'[Date])),[Flag_Value]) 

 2. Result: 

veqinmsft_0-1685090230859.png

 

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 

 

I did all that but in my case i get every 0 in all fields... 

darkobrown_0-1685449154421.png

 

Do you have any idea where it may failed? 

 

BR,

Darko

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.