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
Talal141218
Helper III
Helper III

Cumulative with filter specific source

Hi Community,

I need your support here please , I created a cumulative measure as below : CALCULATE(SUM(Fact_LiquidityForecast[OverdraftAmountActual_CCY]), FILTER(ALLSELECTED(Fact_LiquidityForecast), Fact_LiquidityForecast[DueDate_NK] <= MAXA(Fact_LiquidityForecast[DueDate_NK]))).

And I want to cumulate just the Kontokorrentlinie (overdraft) values, you will find the schedual below may help : 

 

Talal141218_0-1690964041420.png

 

Thanks a lot in Advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Talal141218 ,

 

You can try:

TotalPeriodMeasure = CALCULATE(
    [CM_Fact_LiquidityForecast_OverdraftAmountActual_CCY],
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[Source_NK] <= MAX(Fact_LiquidityForecast[Source_NK])
    ),
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[DueDate_NK] <= MAX(Fact_LiquidityForecast[DueDate_NK])
    )
)
EndOfMonthMeasure = CALCULATE(
    [CM_Fact_LiquidityForecast_OverdraftAmountActual_CCY],
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[Source_NK] <= MAX(Fact_LiquidityForecast[Source_NK]) &&
        Fact_LiquidityForecast[DueDate_NK] = EOMONTH(Fact_LiquidityForecast[DueDate_NK], 0)
    ),
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[DueDate_NK] <= MAX(Fact_LiquidityForecast[DueDate_NK])
    )
)

If you mean that TOTAL is not displayed correctly, then you can create a new measure to place on the visual object to see if the total is correct.

New Measure= SUMX(VALUES('TABLE'[ColumnName]),[Measure])

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

4 REPLIES 4
Anonymous
Not applicable

Hi @Talal141218 ,

 

You can update your measure as follows:

Measure=
CALCULATE(
    SUM(Fact_LiquidityForecast[OverdraftAmountActual_CCY]),
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[DueDate_NK] <= MAXA(Fact_LiquidityForecast[DueDate_NK]) &&
        Fact_LiquidityForecast[AccountType] = "Kontokorrentlinie"
    )
)

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

Hi @Anonymous ,

Firstfull Thanks for your support, I traid this measure and i did't get the result, as i wish. Otherwise I updated the measure as below, but i did't get the sum of the total period and the sum for end of month:

CALCULATE([CM_Fact_LiquidityForecast_OverdraftAmountActual_CCY] , filter(allselected(Fact_LiquidityForecast), Fact_LiquidityForecast[Source_NK] = max(Fact_LiquidityForecast[Source_NK]) && Fact_LiquidityForecast[Source_NK] <= max( Fact_LiquidityForecast[Source_NK])), FILTER(ALLSELECTED(Fact_LiquidityForecast), Fact_LiquidityForecast[DueDate_NK] <= MAX(Fact_LiquidityForecast[DueDate_NK]))).
If you have any suggestions i will be thankfull 
Anonymous
Not applicable

Hi @Talal141218 ,

 

You can try:

TotalPeriodMeasure = CALCULATE(
    [CM_Fact_LiquidityForecast_OverdraftAmountActual_CCY],
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[Source_NK] <= MAX(Fact_LiquidityForecast[Source_NK])
    ),
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[DueDate_NK] <= MAX(Fact_LiquidityForecast[DueDate_NK])
    )
)
EndOfMonthMeasure = CALCULATE(
    [CM_Fact_LiquidityForecast_OverdraftAmountActual_CCY],
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[Source_NK] <= MAX(Fact_LiquidityForecast[Source_NK]) &&
        Fact_LiquidityForecast[DueDate_NK] = EOMONTH(Fact_LiquidityForecast[DueDate_NK], 0)
    ),
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[DueDate_NK] <= MAX(Fact_LiquidityForecast[DueDate_NK])
    )
)

If you mean that TOTAL is not displayed correctly, then you can create a new measure to place on the visual object to see if the total is correct.

New Measure= SUMX(VALUES('TABLE'[ColumnName]),[Measure])

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

Anonymous
Not applicable

Hi @Talal141218 ,

 

You can try:

TotalPeriodMeasure = CALCULATE(
    [CM_Fact_LiquidityForecast_OverdraftAmountActual_CCY],
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[Source_NK] <= MAX(Fact_LiquidityForecast[Source_NK])
    ),
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[DueDate_NK] <= MAX(Fact_LiquidityForecast[DueDate_NK])
    )
)
EndOfMonthMeasure = CALCULATE(
    [CM_Fact_LiquidityForecast_OverdraftAmountActual_CCY],
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[Source_NK] <= MAX(Fact_LiquidityForecast[Source_NK]) &&
        Fact_LiquidityForecast[DueDate_NK] = EOMONTH(Fact_LiquidityForecast[DueDate_NK], 0)
    ),
    FILTER(
        ALLSELECTED(Fact_LiquidityForecast),
        Fact_LiquidityForecast[DueDate_NK] <= MAX(Fact_LiquidityForecast[DueDate_NK])
    )
)

If you mean that TOTAL is not displayed correctly, then you can create a new measure to place on the visual object to see if the total is correct.

New Measure= SUMX(VALUES('TABLE'[ColumnName]),[Measure])

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

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.