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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mikesdunbar
Helper I
Helper I

Calculate difference using minimum values

I'm trying to establish a value for whether someone underused or overused hours allocated to a project. For instance, Tom Smith wasn't forcasted to work on 3/4/2024, so he was over $80.40. On 3/19 Nick Roth was forecasted to work 13 hours but actually worked 0.5, therefore underutilizing $314.88 of billable work.

 

My issue comes with a function from the raw data I cannot change. When someone has 0 approved hours, it defaults to an exhorborant number (again, something I cannot change). This is particulary challenging because if someone is forecasted to work and then doesn't, it's a missed opportunity to bill hours (see 3/11/2024). 

 

My solution to this was to just use the minimum value in the Rate column per User. I tried making a separate calculated table with the User where it had their name and their minimum rate, which gave me a table with those values, but I was unable to calculate that Billing Delta column. 

 

Any other ideas? Thank you! 

mikesdunbar_0-1729527437340.png


Here's the table data.

DateFilterProjectUser Rate  Forceasted hoursActual hoursForecasted Billing AmountActual billed amountBilling Delta
3/4/20241.00Tunnel PaintTom Smith $                     20.1004$80.40$80.40-$80.40
3/4/20241.00Tunnel PaintGeorge Green $  214,748,364.7000$0.00$0.00$0.00
3/11/20241.00Tunnel PaintNick Roth $  214,748,364.7010.880$0.00$0.00$2,336,462,207.94
3/11/20241.00Tunnel PaintTom Smith $  214,748,364.705.040$0.00$0.00$1,082,331,758.09
3/11/20241.00Tunnel PaintGeorge Green $  214,748,364.7000$0.00$0.00$0.00
3/11/20241.00Tunnel PaintErin Erickson $  214,748,364.7000$0.00$0.00$0.00
3/18/20241.00Tunnel PaintNick Roth $                     24.6013.30.5$12.30$12.30$314.88
3/18/20241.00Tunnel PaintTom Smith $                     20.106.1610$10.05$10.05-$77.18
3/25/20241.00Tunnel PaintNick Roth $                     24.6010.880.75$18.45$18.45$249.20
3/25/20241.00Tunnel PaintTom Smith $  214,748,364.705.040$0.00$0.00$1,082,331,758.09
10/28/20241.00Tunnel PaintNick Roth $  214,748,364.705.280$130.38$0.00$1,133,871,365.62
10/28/20241.00Tunnel PaintTom Smith $  214,748,364.7000$0.00$0.00$0.00
11/4/20241.00Tunnel PaintNick Roth $  214,748,364.704.320$106.60$0.00$927,712,935.50
11/4/20241.00Tunnel PaintTom Smith $  214,748,364.7000$0.00$0.00$0.00
11/11/20241.00Tunnel PaintNick Roth $  214,748,364.705.280$130.38$0.00$1,133,871,365.62
11/11/20241.00Tunnel PaintTom Smith $  214,748,364.7000$0.00$0.00$0.00
11/11/20241.00Tunnel PaintGeorge Green $  214,748,364.7000$0.00$0.00$0.00
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mikesdunbar ,
In Power BI Desktop, you can create calculated column to achieve this

Actual Rate = 
CALCULATE(
    MIN('Table'[Rate]),
    ALLEXCEPT(
        'Table',    
        'Table'[User]
    )
)
Billing Delt Rate = ('Table'[Forceasted hours] - 'Table'[Actual hours]) * 'Table'[Actual Rate]

Fina output

vheqmsft_0-1729562755789.png

 

Best regards,
Albert He


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

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

In another column, show the expected result very clearly and also the method of calculation.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @mikesdunbar ,
In Power BI Desktop, you can create calculated column to achieve this

Actual Rate = 
CALCULATE(
    MIN('Table'[Rate]),
    ALLEXCEPT(
        'Table',    
        'Table'[User]
    )
)
Billing Delt Rate = ('Table'[Forceasted hours] - 'Table'[Actual hours]) * 'Table'[Actual Rate]

Fina output

vheqmsft_0-1729562755789.png

 

Best regards,
Albert He


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

 

lbendlin
Super User
Super User

some would say exorbitant, others would recognize a buffer overrun (2 to the Power of 31 minus 1, divided by 10 for some reason).  Might want to replace that value with null.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors