Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
StaffName | UnitsLogged | IsUtilised | MonthRecorded | CalculatedColumn |
Sally | 5 | True | 202010 | 5 |
Sally | 2 | False | 202010 | 5 |
Bob | 6 | True | 202010 | 9 |
Bob | 3 | True | 202010 | 9 |
Bob | 7 | False | 202010 | 9 |
Sally | 4 | True | 202009 | 11 |
Sally | 7 | True | 202009 | 11 |
Sally | 7 | False | 202009 | 11 |
Bob | 5 | False | 202009 | 8 |
Bob | 8 | True | 202009 | 8 |
Thanks!
Solved! Go to Solution.
@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])
@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])
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
18 | |
18 | |
18 | |
17 |
User | Count |
---|---|
34 | |
25 | |
18 | |
16 | |
13 |