Forum Discussion

Talal141218's avatar
Talal141218
Helper III
3 years ago
Solved

Floating sum cumulative

Hello Experts, 

I need your help here. 

I created a cumulative measure as below : 

 

calculate(SUM(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]))).
As you see in the screenshot , The measure didn't accumulate of the end of every month just for SEP & DEC, where the amounts availabe. 
 

 

 
And i need the sum of cumulative for end of every month and as result the whole year. 
 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Talal141218 ,

     

    Based on your description, the measure Gesamt is incorrectly totaled.
    Please try creating a new measure to place on the visual object instead of the old one.

    Gesamt=calculate(SUM(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])))
    New Measure =
    SUMX(
        SUMMARIZE(
            'Table',
            'Table'[RowName],
            'Table'[ColumnName],
            "total",[Gesamt]
        ),
        [total]
    )
    

    Or:

    New Measure = SUMX(VALUES('Table'[Column]),[Gesamt])
    

     

    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. 

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Talal141218 ,

     

    Based on your description, the measure Gesamt is incorrectly totaled.
    Please try creating a new measure to place on the visual object instead of the old one.

    Gesamt=calculate(SUM(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])))
    New Measure =
    SUMX(
        SUMMARIZE(
            'Table',
            'Table'[RowName],
            'Table'[ColumnName],
            "total",[Gesamt]
        ),
        [total]
    )
    

    Or:

    New Measure = SUMX(VALUES('Table'[Column]),[Gesamt])
    

     

    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.