Forum Discussion
ivannye
5 years agoHelper I
calculation error data sumx
Hello, Thank you for your help. I have an issue where I have the following dax. Running12months 1 = var currentdate=SELECTEDVALUE(HeadCount[EndOfMonth]) var yr= YEAR(currentdate)-1 ...
- 5 years ago
ivannye , Check the datatype of EndOfMonth, That can cause this issue. Over all formula seems correct, Try this small change
Running12months 1 =
var currentdate=maxx(allselected(HeadCount),[EndOfMonth])
var yr= YEAR(currentdate)-1
var mt = MONTH(currentdate)+1
var previousdate=DATE(YEAR(currentdate)-1,MONTH(currentdate),DAY(currentdate))
return
SUMX(FILTER(ALLSELECTED(HeadCount[EndOfMonth],HeadCount[Costcentre]),HeadCount[EndOfMonth]>=previousdate && HeadCount[EndOfMonth]<=currentdate),[Empoyees That Left 2])
ivannye
5 years agoHelper I
I have an issue now to that calculation.
The column returns the same number