cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper IV

Cumulative Sum less then Current Date

Hi All,

I need the Cumulative Sum measure for the column based on the less then Current Date which means I want to add the colum "ST_Day_Duration" provided the Contract End Date is less then Today() as seen in the foolowing screen print. I want to Sum the ST_Day_Duration column for India except the contract Date less then today.

Similarly I want to sum the USA except the contract Date less then today.

Please assist with the Mesure or column.

Thanks

Suhel

1 ACCEPTED SOLUTION
Community Support

Create a measure:

``````Measure =
IF (
MAX('Table'[Contract end date]) <= TODAY (),
CALCULATE (
SUM ( 'Table'[ST_Day_Duration] ),
FILTER (
ALL ( 'Table' ),
'Table'[Contract end date] <= TODAY ()
&& 'Table'[Country] = SELECTEDVALUE( 'Table'[Country] )
)
)
)``````

Best regards,

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

7 REPLIES 7
Community Support

``````Column =
IF (
'Table'[Contract end date] <= TODAY (),
CALCULATE (
SUM ( 'Table'[ST_Day_Duration] ),
FILTER ( ALL ( 'Table' ), 'Table'[Contract end date] <= TODAY () )
)
)``````

Best regards,

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

Helper IV

It a partial answer I am getting wrong answer if i have more Country as seen in the attached screen print and moreover I need a Measure please assit. Thanks

Regards

Suhel

Community Support

Create a measure:

``````Measure =
IF (
MAX('Table'[Contract end date]) <= TODAY (),
CALCULATE (
SUM ( 'Table'[ST_Day_Duration] ),
FILTER (
ALL ( 'Table' ),
'Table'[Contract end date] <= TODAY ()
&& 'Table'[Country] = SELECTEDVALUE( 'Table'[Country] )
)
)
)``````

Best regards,

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

Helper IV

Thank you for the prompt respone, I need to cretae a another Measure to get the "Max - ST_Day_Duration" for the Future date for Example as seen in the following screen print, for India the future date is "5/18/2026" and the value should be "210.3903" similarly for USA the date is "10/6/2025" and the value should be "69.3903", please assist. Thanks🙏

Regards

Suhel

Community Support

In order to better understanding your demands and give the right solution, could you please tell me what's your expected output?

Best regards,

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

Helper IV

I want the Cumulative Sum for all the row for the "ST_Day_Duration" for a given Country provided the Contract End Date is less then Today() Date. Exmaple for the country INDIA i want to sum the (16.9389+7.0278+20.916) = 44.8827 Rows, Except the first Row whos Contract End Date is "5/18/2026".

Regards

Suhel

Helper IV

@amitchandak  , @Greg_Deckler , @parry2k  , please asssit. Thanks

Announcements

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors