Skip to Main Content
Learn Power BI
book

Learn Power BI

by Greg Deckler
September 2019
Beginner to intermediate content levelBeginner to intermediate
362 pages
9h 22m
English
Packt Publishing
Content preview from Learn Power BI

Creating calculated columns for utilization

For the purposes of calculating utilization, we want the total hours billed by an employee divided by the total hours reported by an employee.

In order to get the first part of this, that is, the total hours billed, we need to create a third calculated column using the following formula:

Column 3 = SUMX(    FILTER(        ALL('Hours'),        [Category] = "Billable" && [EmployeeID] = EARLIER([EmployeeID])    ),    [Hours])

Use Alt+Enter and Tab to create the correct formatting. Alt+Enter inserts a new line or break, while Tab indents the text that's entered.

By way of explanation, the SUMX function takes two parameters: a table and a numeric column. These parameters are separated by a comma (,). The SUMX function iterates ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Power BI - Second Edition

Learn Power BI - Second Edition

Greg Deckler

Publisher Resources

ISBN: 9781838644482Supplemental Content