Forum Discussion

grkanth81's avatar
grkanth81
Icon for Helper II rankHelper II
1 year ago
Solved

Help need with creating this new measure

Hi all, We are using Power BI Report Server (May 2025 version).  Here is my sample test data: Period table: Period_integer FY Period per_begin_date per_end_date 202401 FY 2024 Jul-23 ...
  • v-karpurapud's avatar
    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.