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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -