Forum Discussion

Talal141218's avatar
Talal141218
Helper III
3 years ago
Solved

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)...
  • Anonymous's avatar
    Anonymous
    3 years ago

    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.