Forum Discussion
Rosh89
Helper I
3 years agoDAX for calculating previous month values
Hi, I have a table as shown below: Month Period Customer Bonus Previous bonus Jan-22 1 A 100 Feb-22 2 A 200 100 Mar-22 3 A 150 200 Jan-22 1 B 300 Feb-22...
- Anonymous3 years ago
Hi Rosh89 ,
You could add a date column like below:
date = DATEVALUE("1-"&'Table'[Month])Then create a measure:
Measure = CALCULATE(SUM('Table'[Bonus]),FILTER(ALLEXCEPT('Table','Table'[Customer]),'Table'[date]=EDATE(SELECTEDVALUE('Table'[date]),-1)))
Anonymous
3 years agoNot applicable
Hi Rosh89 ,
You could add a date column like below:
date = DATEVALUE("1-"&'Table'[Month])
Then create a measure:
Measure = CALCULATE(SUM('Table'[Bonus]),FILTER(ALLEXCEPT('Table','Table'[Customer]),'Table'[date]=EDATE(SELECTEDVALUE('Table'[date]),-1)))