Forum Discussion
JP8991
5 years agoKudo Commander
VAR Measure Not Working
Seperating all of these measures out it works fine however I cannot seem to get them working in a single measure. Is there anything I am missing? Centre Turnover (NEW) = VAR Rolling = DATE...
- 5 years ago
Ok, so I managed to figure this out myself.
I removed the reference to variables within the variables themselves, makes for a neater formula and gave me the desired result!Centre Turnover (NEW) =VAR AverageHeadcount = AVERAGEX(DATESINPERIOD('Calendar'[Date], MAX('Calendar'[Date]), -12, MONTH),AVERAGEX(DATESINPERIOD('Calendar'[Date], MAX('Calendar'[Date]), -12, MONTH), CALCULATE(COUNT('Employee Data'[ID Number]), 'Employee Data'[Business Area] = "Centre", 'Employee Data'[Status] <> "T", 'Employee Data'[Employment Type] <> "Casual")))VAR CentreTerminations12MTD = CALCULATE(CALCULATE(DISTINCTCOUNT('Employee Data'[ID Number]), 'Employee Data'[Business Area] = "Centre", 'Employee Data'[Status] = "T", 'Employee Data'[Employment Type] <> "Casual", 'Employee Data'[Term Type] <> "N/A", USERELATIONSHIP('Calendar'[Date], 'Employee Data'[Term Date])), DATESINPERIOD('Calendar'[Date], MAX('Calendar'[Date]), -12, MONTH))RETURNDIVIDE(CentreTerminations12MTD, AverageHeadcount, 0)
amitchandak
5 years agoSuper User
JP8991 ,Can you share sample data and sample output in table format?
JP8991
5 years agoKudo Commander
amitchandak
Centre Information
It seems as though the VAR Calc is dividing terminations by the entire years worth of headcount which returns around 2%.
However when the measures are split out the result is around 27% which is what I expect.