Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
pparke
Frequent Visitor

Interpret measures

Hi, 

 

New to Power BI and trying to interpret measures that have been created by someone else. Could anyone intrepret these please? 

 

1.

Rolling HC =
VAR MaxIndex = MAX(TURNOVER_Payroll_Calendar[Index])
VAR MinIndex = MaxIndex - 12
VAR Result =
CALCULATE(
    (COUNT('FINAL_TURNOVER_MERGED'[Position ID])/12), FILTER(ALLEXCEPT('FINAL_TURNOVER_MERGED','FINAL_TURNOVER_MAPPING'[Org Unit],'FINAL_TURNOVER_MAPPING'[NDIS Roles],'FINAL_TURNOVER_MAPPING'[Service Area], 'FINAL_TURNOVER_MAPPING'[Location],'MAPPING_OVERVIEW'[Location],'FINAL_TURNOVER_MAPPING'[Position ID]),'FINAL_TURNOVER_MERGED'[Index] <= MaxIndex && 'FINAL_TURNOVER_MERGED'[Index] > MinIndex && 'FINAL_TURNOVER_MERGED'[Source] = "Position"
    )
   )
RETURN
IF(ISBLANK(Result),0,
Result)
 
 
2. 
Rolling Term =
VAR MaxIndex = MAX(TURNOVER_Payroll_Calendar[Index])
VAR MinIndex = MaxIndex - 12
VAR Result =
CALCULATE(
    (COUNT('FINAL_TURNOVER_MERGED'[Position ID])), FILTER(ALLEXCEPT('FINAL_TURNOVER_MERGED','FINAL_TURNOVER_MAPPING'[Org Unit],'FINAL_TURNOVER_MAPPING'[NDIS Roles],'FINAL_TURNOVER_MAPPING'[Service Area], 'FINAL_TURNOVER_MAPPING'[Location],'MAPPING_OVERVIEW'[Location],'FINAL_TURNOVER_MAPPING'[Position ID]),'FINAL_TURNOVER_MERGED'[Index] <= MaxIndex && 'FINAL_TURNOVER_MERGED'[Index] > MinIndex && 'FINAL_TURNOVER_MERGED'[Source] = "Offboard"
    )
   )
RETURN
IF(ISBLANK(Result),0,
Result)
 
 
Thank You!  
1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @pparke ,

 

This is actually a use-case for which tools like ChatGPT can be your friend. I've reviewed the responses to ensure they haven't been hallucinated.

** The following responses were generated by ChatGPT 4o  **

 

Measure 1:

This DAX measure, `Rolling HC`, calculates the rolling average headcount over a 12-month period for specific organizational units, roles, service areas, locations, and positions within a dataset. Here’s a breakdown of what each part does:

1. **Variable Definitions**:
- `MaxIndex`: Finds the maximum value of the `Index` column in the `TURNOVER_Payroll_Calendar` table within the current filter context.
- `MinIndex`: Calculates the minimum index for the 12-month rolling window by subtracting 12 from `MaxIndex`.

2. **Result Calculation**:
- The `CALCULATE` function is used to modify the context in which the data is evaluated.
- `(COUNT('FINAL_TURNOVER_MERGED'[Position ID])/12)`: Counts the number of unique `Position ID` values in the `FINAL_TURNOVER_MERGED` table and divides by 12 to get a monthly average.
- `FILTER(ALLEXCEPT(...))`: Removes any filters from the `FINAL_TURNOVER_MERGED` table except those on specific columns related to organizational structure (`Org Unit`, `NDIS Roles`, `Service Area`, `Location`, and `Position ID`).
- The `FILTER` function restricts the data to rows where the `Index` is within the 12-month window (`<= MaxIndex && > MinIndex`) and the `Source` column is equal to "Position".

3. **Return Value**:
- The `IF` function checks if `Result` is blank.
- If `Result` is blank, it returns 0.
- Otherwise, it returns the calculated `Result`.

In summary, this measure calculates the average monthly headcount over the past 12 months for specified organizational dimensions. If no data is found, it returns 0.

 

Measure 2:

This DAX measure, `Rolling Term`, calculates the rolling total number of terminations (offboarding) over a 12-month period for specific organizational units, roles, service areas, locations, and positions within a dataset. Here's a detailed breakdown:

1. **Variable Definitions**:
- `MaxIndex`: Finds the maximum value of the `Index` column in the `TURNOVER_Payroll_Calendar` table within the current filter context.
- `MinIndex`: Calculates the minimum index for the 12-month rolling window by subtracting 12 from `MaxIndex`.

2. **Result Calculation**:
- The `CALCULATE` function is used to modify the context in which the data is evaluated.
- `(COUNT('FINAL_TURNOVER_MERGED'[Position ID]))`: Counts the number of unique `Position ID` values in the `FINAL_TURNOVER_MERGED` table.
- `FILTER(ALLEXCEPT(...))`: Removes any filters from the `FINAL_TURNOVER_MERGED` table except those on specific columns related to organizational structure (`Org Unit`, `NDIS Roles`, `Service Area`, `Location`, and `Position ID`).
- The `FILTER` function restricts the data to rows where the `Index` is within the 12-month window (`<= MaxIndex && > MinIndex`) and the `Source` column is equal to "Offboard".

3. **Return Value**:
- The `IF` function checks if `Result` is blank.
- If `Result` is blank, it returns 0.
- Otherwise, it returns the calculated `Result`.

In summary, this measure calculates the total number of terminations (offboardings) over the past 12 months for specified organizational dimensions. If no data is found, it returns 0.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi @pparke ,

 

This is actually a use-case for which tools like ChatGPT can be your friend. I've reviewed the responses to ensure they haven't been hallucinated.

** The following responses were generated by ChatGPT 4o  **

 

Measure 1:

This DAX measure, `Rolling HC`, calculates the rolling average headcount over a 12-month period for specific organizational units, roles, service areas, locations, and positions within a dataset. Here’s a breakdown of what each part does:

1. **Variable Definitions**:
- `MaxIndex`: Finds the maximum value of the `Index` column in the `TURNOVER_Payroll_Calendar` table within the current filter context.
- `MinIndex`: Calculates the minimum index for the 12-month rolling window by subtracting 12 from `MaxIndex`.

2. **Result Calculation**:
- The `CALCULATE` function is used to modify the context in which the data is evaluated.
- `(COUNT('FINAL_TURNOVER_MERGED'[Position ID])/12)`: Counts the number of unique `Position ID` values in the `FINAL_TURNOVER_MERGED` table and divides by 12 to get a monthly average.
- `FILTER(ALLEXCEPT(...))`: Removes any filters from the `FINAL_TURNOVER_MERGED` table except those on specific columns related to organizational structure (`Org Unit`, `NDIS Roles`, `Service Area`, `Location`, and `Position ID`).
- The `FILTER` function restricts the data to rows where the `Index` is within the 12-month window (`<= MaxIndex && > MinIndex`) and the `Source` column is equal to "Position".

3. **Return Value**:
- The `IF` function checks if `Result` is blank.
- If `Result` is blank, it returns 0.
- Otherwise, it returns the calculated `Result`.

In summary, this measure calculates the average monthly headcount over the past 12 months for specified organizational dimensions. If no data is found, it returns 0.

 

Measure 2:

This DAX measure, `Rolling Term`, calculates the rolling total number of terminations (offboarding) over a 12-month period for specific organizational units, roles, service areas, locations, and positions within a dataset. Here's a detailed breakdown:

1. **Variable Definitions**:
- `MaxIndex`: Finds the maximum value of the `Index` column in the `TURNOVER_Payroll_Calendar` table within the current filter context.
- `MinIndex`: Calculates the minimum index for the 12-month rolling window by subtracting 12 from `MaxIndex`.

2. **Result Calculation**:
- The `CALCULATE` function is used to modify the context in which the data is evaluated.
- `(COUNT('FINAL_TURNOVER_MERGED'[Position ID]))`: Counts the number of unique `Position ID` values in the `FINAL_TURNOVER_MERGED` table.
- `FILTER(ALLEXCEPT(...))`: Removes any filters from the `FINAL_TURNOVER_MERGED` table except those on specific columns related to organizational structure (`Org Unit`, `NDIS Roles`, `Service Area`, `Location`, and `Position ID`).
- The `FILTER` function restricts the data to rows where the `Index` is within the 12-month window (`<= MaxIndex && > MinIndex`) and the `Source` column is equal to "Offboard".

3. **Return Value**:
- The `IF` function checks if `Result` is blank.
- If `Result` is blank, it returns 0.
- Otherwise, it returns the calculated `Result`.

In summary, this measure calculates the total number of terminations (offboardings) over the past 12 months for specified organizational dimensions. If no data is found, it returns 0.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.