Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to sum all sales for the max year and for each unique transaction number.
I was able to sum for the ma year:
sum({<YearPeriod={$(=Max(YearPeriod))}>} [Sales])
but I need to add an additional condition of distinct transaction number so that it will sum one row per each transaction number.
The reason why I have to do this is because there are multiple rows with the same sales amount for unique transaction numbers.
Can anyone help?
Sum({<YearPeriod={$(=Max(YearPeriod))}>}
Aggr(
Only({<YearPeriod={$(=Max(YearPeriod))}>} [Sales])
, TransactionID)
)
Great! What if I wanted to include all the years?
Sum(
Aggr(
Only( [Sales])
, TransactionID)
)