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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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