Forum Discussion
Separate Count Based on Date
- 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.
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.