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

SUM LOOKUPVALUE - Attempting to sum units with multiple criteria

Hi Power BI forum,

 

I have a vast table of transaction data and I'm hoping to find the total utilised time per staff per month in a table that looks similar to the one below. I'm struggling to find the right formula to use in my calculated column. Appreciate any suggestions.

 

StaffNameUnitsLoggedIsUtilisedMonthRecordedCalculatedColumn
Sally5True2020105
Sally2False2020105
Bob6True2020109
Bob3True2020109
Bob7False2020109
Sally4True20200911
Sally7True20200911
Sally7False20200911
Bob5False2020098
Bob8True2020098

 

Thanks!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@PowerMyBI , Try a new column like

 


CalculatedColumn = sumx(filter(Table, [StaffName] =earlier([StaffName]) && [MonthRecorded] =earlier([MonthRecorded]) && [IsUtilised] ="True"),[UnitsLogged])

 

if IsUtilised is a boolean

CalculatedColumn = sumx(filter(Table, [StaffName] =earlier([StaffName]) && [MonthRecorded] =earlier([MonthRecorded]) && [IsUtilised] ),[UnitsLogged])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@PowerMyBI , Try a new column like

 


CalculatedColumn = sumx(filter(Table, [StaffName] =earlier([StaffName]) && [MonthRecorded] =earlier([MonthRecorded]) && [IsUtilised] ="True"),[UnitsLogged])

 

if IsUtilised is a boolean

CalculatedColumn = sumx(filter(Table, [StaffName] =earlier([StaffName]) && [MonthRecorded] =earlier([MonthRecorded]) && [IsUtilised] ),[UnitsLogged])

@amitchandak that works perfectly! Thank you for help

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.

Top Solution Authors