Forum Discussion
Help need with creating this new measure
- 1 year ago
Hi grkanth81
Welcome to the Microsoft Fabric Community Forum. Also, thank you ABD128 and Nasif_Azam for your quick responses.To calculate the required metric, follow the instructions where the cumulative hours for each month are divided by the average of the FTE from the start period (Jul-2024) and the FTE from the current period.
Before creating the measure, ensure that the following relationships exist in the data model:
- Period[Period_integer] → FTE[period]
- Period[Period_integer] → Hours[period]
Consider the below DAX:CumulativeHrsDivByAvgFTE = VAR CurrentPeriod = MAX('Period'[Period_integer]) VAR CumHrs = CALCULATE ( SUM ( Hours[Disc_Hrs] ), FILTER ( ALL ( 'Period' ), 'Period'[Period_integer] <= CurrentPeriod ) ) VAR StartFTE = CALCULATE ( SUM ( FTE[FTE] ), FILTER ( ALL ( FTE ), FTE[period] = 202501 ) ) VAR CurrentFTE = CALCULATE ( SUM ( FTE[FTE] ), FILTER ( ALL ( FTE ), FTE[period] = CurrentPeriod ) ) VAR AvgFTE = DIVIDE ( StartFTE + CurrentFTE, 2 ) RETURN DIVIDE ( CumHrs, AvgFTE )Please refer attached Screenshot and .pbix file for your reference and share your thoughts.
If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.Welcome to the Microsoft Fabric Forum. Also, thank you and for your qucik responses.
If this response resolves your query, kindly mark it as Accepted Solution to help other community members. A Kudos is also appreciated if you found the response helpful.
Thank you for being part of Fabric Community Forum.
Regards,
Karpurapu D,
Microsoft Fabric Community Support Team.
Hi grkanth81
Welcome to the Microsoft Fabric Community Forum. Also, thank you ABD128 and Nasif_Azam for your quick responses.
To calculate the required metric, follow the instructions where the cumulative hours for each month are divided by the average of the FTE from the start period (Jul-2024) and the FTE from the current period.
Before creating the measure, ensure that the following relationships exist in the data model:
- Period[Period_integer] → FTE[period]
- Period[Period_integer] → Hours[period]
Consider the below DAX:
CumulativeHrsDivByAvgFTE =
VAR CurrentPeriod = MAX('Period'[Period_integer])
VAR CumHrs =
CALCULATE (
SUM ( Hours[Disc_Hrs] ),
FILTER (
ALL ( 'Period' ),
'Period'[Period_integer] <= CurrentPeriod
)
)
VAR StartFTE =
CALCULATE (
SUM ( FTE[FTE] ),
FILTER (
ALL ( FTE ),
FTE[period] = 202501
)
)
VAR CurrentFTE =
CALCULATE (
SUM ( FTE[FTE] ),
FILTER (
ALL ( FTE ),
FTE[period] = CurrentPeriod
)
)
VAR AvgFTE = DIVIDE ( StartFTE + CurrentFTE, 2 )
RETURN
DIVIDE ( CumHrs, AvgFTE )
Please refer attached Screenshot and .pbix file for your reference and share your thoughts.
If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Welcome to the Microsoft Fabric Forum. Also, thank you and for your qucik responses.
If this response resolves your query, kindly mark it as Accepted Solution to help other community members. A Kudos is also appreciated if you found the response helpful.
Thank you for being part of Fabric Community Forum.
Regards,
Karpurapu D,
Microsoft Fabric Community Support Team.
- grkanth811 year ago
Helper II
Thanks karpurapud. I am looking into it. But you mentioned in your post you have attached pbix file but I couldn't find it. can you please attach it so I can refer to it ?
- v-karpurapud1 year ago
Community Support
Hi grkanth81
I apologize . I might have missed . I have attached now . Please have a look into it.- v-karpurapud1 year ago
Community Support
Hi grkanth81
We have not received a response from you regarding the query and were following up to check if you have found a resolution. If you find the response helpful, please mark it as the accepted solution and provide kudos, as this will help other members with similar queries.
Thank You!