Forum Discussion
Tito
2 years agoHelper IV
MAX-Formula
Hello, I have a problem with the MAX formula. In my example, I want to calculate a sum of sales with maximum of date only for group A. And for group B I calculate the sum of sales without the maximu...
- 2 years ago
Hello,
I have solved the problem with the following DAX function.
Thank you very much for your support.
gmsamborn
2 years agoSuper User
Hi Tito
Would something like this help?
Sum Sales current 2 =
VAR MaxSalesGroupA =
CALCULATE (
SUM ( Tabelle1[Sales] ),
Tabelle1[Date] = MAX ( Tabelle1[Date] ),
KEEPFILTERS ( Tabelle1 ),
Tabelle1[Group] = "A"
)
VAR SalesGroupB =
CALCULATE (
SUM ( Tabelle1[Sales] ),
KEEPFILTERS ( Tabelle1 ),
Tabelle1[Group] = "B"
)
RETURN
MaxSalesGroupA + SalesGroupBTito
2 years agoHelper IV
Thank you for your answer.
I have tried this before, but it did not work.
Thank you