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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Distribution of Dollar Amounts based on Percentages

Hello everyone!

 

We are trying to build a report that shows the corresponding labor charge for each technician that worked on a ticket, based on the technician’s actual time on site, as a percentage of the ticket’s total time.

 

The percentages and the calculations are working properly when analyzing one ticket but breaks down when selecting more than one ticket. Please see examples below:

 

CORRECT

CORRECT 1.jpg

 CORRECT

CORRECT 2.jpgINCORRECT

INCORRECT.jpg

DESIRED RESULT

 

DESIRED RESULT.jpg

 

 

Measures

Total Actual Time on Site (Hrs.) =

SUM ( SV_Service_Ticket_Dispatch[Arrival to Departure (Hrs.)] )

 

% Labor of Technician =

SUM ( SV_Service_Ticket_Dispatch[Arrival to Departure (Hrs.)] )

    / CALCULATE (

        SUM ( SV_Service_Ticket_Dispatch[Arrival to Departure (Hrs.)] ),

        SV_Service_Ticket_Dispatch[Service_ticket_id],

        SV_Service_Ticket_Dispatch[Service_Tech_Id],

        ALLSELECTED ()

    )

 

$ Labor of Technician =

[% Labor of Technician]

    * LOOKUPVALUE (

        SV_Service_Ticket[Labor_Charge],

        SV_Service_Ticket[Service_Ticket_Id], MAX ( SV_Service_Ticket_Dispatch[Service_Ticket_Id] )

    )

 

Here is a link to the sample report: 

 

https://1651wilkening-my.sharepoint.com/:u:/g/personal/juan_cordero_convergint_com/EeC6KOgljBtOkYXqK... 

 

I am casual user of the tool and appreciate any help provided with this question.

 

Thank you,

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Calculate % of subtotal and use that.

Refer :https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

Calculate % of subtotal and use that.

Refer :https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

Anonymous
Not applicable

Hello @amitchandak ,

 

Thank you so much for your help with this. The artilce pointed me in the right direction and was able to get the desired result. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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