Forum Discussion

geetika3110's avatar
geetika3110
Frequent Visitor
4 years ago
Solved

Need Help - Divide based on multiple criteria

Hi All,

Hope you are well. 

I am new to power BI and trying to create a report and need your support with DAX measure.

 

Below is a sample table where i have MWD spent by month. I am looking for a formula to DIVIDE(SUM(MWD) by 19.125 if month is Jan/april/july/october i.e. 1st month of every quarter and remaining month to be multipled by 15.3.

 

Trying to calculate the FTE spent per month. 19.125 & 15.3 are planned Man working days based on month.

Thank you so much in advance for your support. 

 

MonthMWD
Jan10
Jan20
Jan25
Jan33
Jan41
Jan48
Feb56
Feb63
Feb71
Feb78
Feb86
Feb93
Feb101
March108
March116
March123
March131
March138
March146
March153
March161

 

 

 

  • Hi geetika3110 ,

    According to your description, here's my solution.

    To be divided by =
    IF (
        MAX ( 'FTE'[Month] ) IN { "Jan", "April", "July", "October" },
        19.125,
        15.3
    )
    
    FTE = DIVIDE ( SUM ( 'FTE'[MWD] ), 'FTE'[To be divided by] )

    Get the result.

    I attach my sample below for reference.

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Hi geetika3110 ,

    According to your description, here's my solution.

    To be divided by =
    IF (
        MAX ( 'FTE'[Month] ) IN { "Jan", "April", "July", "October" },
        19.125,
        15.3
    )
    
    FTE = DIVIDE ( SUM ( 'FTE'[MWD] ), 'FTE'[To be divided by] )

    Get the result.

    I attach my sample below for reference.

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • geetika3110's avatar
      geetika3110
      Frequent Visitor

      Thank you so much for your revert,

       

      When i try to count rows using above formula, it is asking for a table and i am not able to select the column that contains "period" or "Month"

       

       

       ( {"Jan", "Apr", "July", "October"}