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
glynwilks
Helper I
Helper I

Calculate Billable Percentage Vs Non Billable Percentage

Hello everyone!

 

I am trying to work out the billable percentage of my service Desk agents, which pulls from an SQL database from HaloPSA. The column in the table I am interested in is called actioncode.

 

If the value in the column is = -1 then the action is considered non-billable

If the value in the column is anything else, then it is considered billable.

 

The column looks like 

 

glynwilks_0-1676984339223.png

 

What I am needing to work out is what percentage of the time entries are billable and what percentage is non-billable

 

My thoughts were to create a column that was an IF statement saying if actioncode=-1 then non-billable else billable (obviously not the query). But I can't seem to get that to work, and then I don't know how to best create a gauge to make it show billable percentages, based on the month etc.

 

 

2 REPLIES 2
bhelou
Responsive Resident
Responsive Resident

Hello , you need to make 2 measures as follow : 

1 : Billable Status = IF(Table1[actioncode] = -1, "Non-Billable", "Billable")

2: Billable Percentage =
DIVIDE(
CALCULATE(COUNTROWS(Table1), Table1[Billable Status] = "Billable"),
COUNTROWS(Table1)
)

Kinely let me know if it works or no , and accept as a solution if it works for you 

 

Thanks for this, I managed to get the first one working, but I seem to be doing something wrong, as I cannot get the second part to calculate. My table is called 'Time Entries (Actions)'

 

 

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.