excel - Sales at X month using Dax -
i have dax formula work out sales amount @ month x works out in 2 stages
cumulative
cumulativsalesx:=calculate(sum('all'[invoice amount]), datesinperiod(calendar[date], lastdate(calendar[date]),-x,month)) cumulativsalesx+1:=calculate(sum('all'[invoice amount ]), datesinperiod(calendar[date], lastdate(calendar[date]),-x+1,month))
then use difference calculate sales in x month
salesx = cumulativsalesx - cumulativsalesx+1
is there more efficient way of doing ?
thank b.
Comments
Post a Comment