The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Dear Community,
I need your help with the following.
I have very simple calculation for Employees Turnover.
Here is the screenshot with the source table, summarized table for months and DAX for turnover measure.
Measure for months works just like it is required, but I need to do it better by addinf other way of calculation for Qtrs and Years or any periods longer than 1 month.
I need measure to sum up results for moths when longer than 1 month period is selected.
For example, if I want to calculate 2024 Qtr Turnover I need to sum Jan-2024 + Feb-2024 + Mar-2024 measure results.
The way of calculation that comes to my mind is to create special table with months results and then calculate the results for month, but I wonder if there is a more beautiful DAX solution without adding other table, I need new measure to work for tables and charts with date ierarchies.
Turnover = DIVIDE(
SUM(Data[Employees Left]),
(SUM(Data[Employee Number 1])+SUM(Data[Employee Number 2]))/2)
Thank you very much in advance!
Solved! Go to Solution.
@orinoko0 , Try using below measure
Turnover =
SUMX(
VALUES(Data[Month]),
DIVIDE(
SUM(Data[Employees Left]),
(SUM(Data[Employee Number 1]) + SUM(Data[Employee Number 2])) / 2
)
)
Proud to be a Super User! |
|
@orinoko0 , Try using below measure
Turnover =
SUMX(
VALUES(Data[Month]),
DIVIDE(
SUM(Data[Employees Left]),
(SUM(Data[Employee Number 1]) + SUM(Data[Employee Number 2])) / 2
)
)
Proud to be a Super User! |
|
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
8 | |
8 |