Forum Discussion

alyssamarce's avatar
alyssamarce
New Member
4 years ago
Solved

Separate Count Based on Date

I'm trying to put together a visual comparing an announcement date against the number of people who call when the announcement goes out. Ideally, the CallId column should be fluctuating up and down b...
  • v-henryk-mstf's avatar
    4 years ago

    Hi alyssamarce ,

     

    It should be a problem caused by ignoring the corresponding external filtering context in your formula.

    amount_ = sum(FactInternetSales[SalesAmount])
    amount_all = CALCULATE(SUM(FactInternetSales[SalesAmount]),ALL(FactInternetSales))

    In the second formula, all external filtering filtering contexts are cleared, including the MonthNumberOfYear field on the x-axis.

    Modify the corresponding formula to keep the filter result of the MonthNumberOfYear field, then the result is correct.

    amount_all =
    CALCULATE (
        SUM ( FactInternetSales[SalesAmount] ),
        ALLEXCEPT ( DimDate, DimDate[MonthNumberOfYear] )
    )


    If the problem is still not resolved, please provide detailed error information and test data. Looking forward to your reply.


    Best Regards,
    Henry


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