Forum Discussion
Veblengood
Helper I
4 years agoCalculate with all function, maintaining filters applied
I am trying to calculate the sum of revenue for 2022 of a all products given that they have sales in a given periode (after 30.06.2022). That is measure [Price 30.06] is not blank or 0. The ...
- 4 years ago
Apologies, part of my inital syntax was incorrect, what solved it was the following:
CALCULATE(Revenue ,Dates[Year]==2022, KEEPFILTERS(Products[Products_ID] <>BLANK()), FILTER(ALL(Products), 'Price analysis'[Price 30.06] <> BLANK())),0)
ribisht17
Super User
4 years ago
SalesAfter2Jan = CALCULATE(sum(SalesAfter[Sales]), FILTER(all(SalesAfter), SalesAfter[Date] >= DATE(2022,01,02)))
(after and including 2 Jan)
Regards,
Ritesh