Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have table that filtered based on my date table
i have measures of calculate active headcount per month and attrition(resign) headcount per month
Now i want to have calculate annual attrition rate = Total attrition per year / average head count that will dynamic depend on the filter
average headcount = sum ( headcount every month)/12
Can help me how to get correct measures of Total attrition per year and average headcount ??
Total attrition should be
attrition headcount 2020 = 95 , 2021 = 3
average headcount 2020 = sum (active headcount per month during 2020)/12 , similar with 2021 as well
Thanks
Solved! Go to Solution.
@laurent_rio , try like
attrition headcount 2020 =
calculate([attrition headcount per month], filter(allselected('Date') , 'Date'[year] = max('Date'[year])))
Try one of the three for average headcount 2020
calculate([active headcoun], filter(allselected('Date') , 'Date'[year] = max('Date'[year])))/12
calculate(sumx('Date'[Month-Year]),[active headcoun]), filter(allselected('Date') , 'Date'[year] = max('Date'[year])))/12
calculate(AverageX('Date'[Month-Year]),[active headcoun]), filter(allselected('Date') , 'Date'[year] = max('Date'[year])))
@laurent_rio , try like
attrition headcount 2020 =
calculate([attrition headcount per month], filter(allselected('Date') , 'Date'[year] = max('Date'[year])))
Try one of the three for average headcount 2020
calculate([active headcoun], filter(allselected('Date') , 'Date'[year] = max('Date'[year])))/12
calculate(sumx('Date'[Month-Year]),[active headcoun]), filter(allselected('Date') , 'Date'[year] = max('Date'[year])))/12
calculate(AverageX('Date'[Month-Year]),[active headcoun]), filter(allselected('Date') , 'Date'[year] = max('Date'[year])))
Hi @amitchandak
Brilliant both DAX are work as a charm. For average i use this
calculate(AverageX('Date'[Month-Year]),[active headcoun]), filter(allselected('Date') , 'Date'[year] = max('Date'[year])))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |