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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
geetika3110
Regular Visitor

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

 

geetika3110_0-1644607977746.png

 

 

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

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.

vkalyjmsft_0-1644909396486.png

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.

View solution in original post

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

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.

vkalyjmsft_0-1644909396486.png

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.

tackytechtom
Super User
Super User

Hi @geetika3110 ,

 

this code 

CONTAINSROW ( {"Jan", "Apr", "July", "October"}, MAX ( Table18[Month] ) 

 evaluates whether the Month is either of the ones you have specified in your question. The curly brackets {"Jan", "Apr", "July", "October"} indicate a table.

 

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

tackytechtom
Super User
Super User

Hi @geetika3110 ,

 

I have a solution:

tomfox_0-1644611473978.png

 

This is the measure I used:

TomsFTEMeasure = 
CALCULATE ( 
    DIVIDE ( 
        SUM ( Table18[MWD] ),
        IF ( CONTAINSROW ( {"Jan", "Apr", "July", "October"}, MAX ( Table18[Month] ) ), 19.125, 15.3 )
    )
)

 

Does this solve your issue? 🙂

 

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

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"

 

geetika3110_0-1644655783581.png

 

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

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.