Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi All,
I have a table loaded into PowerBI called 'Worklogs'. To make a complicated issue a bit simpler, the table looks something similar to this:
Logged Time (Hours) | Project Key | Project Code |
0.5 | EQ-1 | EQ |
0.75 | EQ-1 | EQ |
1 | EQ-91 | EQ |
5 | EQ-418 | EQ |
5 | EQ-418 | EQ |
I want to create two more columns - one is a sum of all time logged against the Project Code EQ (as I do have other PCs in the table), and another would be a sum of all time logged against the Project Code EQ but excluding the Time Logged against Project Key EQ-418.
Is this possible? Should I be using the FILTER function or something else?
Thank you for any help in advance!
Solved! Go to Solution.
@FJH2024 for calculated columns
sum of all time logged against the Project Code EQ = CALCULATE(SUM('Table 1'[Logged Time (Hours)]),FILTER('Table 1','Table 1'[Project Code]="EQ"))
sum of all time logged against the Project Code EQ but excluding the Time Logged against Project Key EQ_418 = 'Table 1'[sum of all time logged against the Project Code EQ]-CALCULATE(SUM('Table 1'[Logged Time (Hours)]),FILTER('Table 1','Table 1'[Project Code]="EQ"&&'Table 1'[Project Key]="EQ-418"))
@FJH2024 for calculated columns
sum of all time logged against the Project Code EQ = CALCULATE(SUM('Table 1'[Logged Time (Hours)]),FILTER('Table 1','Table 1'[Project Code]="EQ"))
sum of all time logged against the Project Code EQ but excluding the Time Logged against Project Key EQ_418 = 'Table 1'[sum of all time logged against the Project Code EQ]-CALCULATE(SUM('Table 1'[Logged Time (Hours)]),FILTER('Table 1','Table 1'[Project Code]="EQ"&&'Table 1'[Project Key]="EQ-418"))
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
93 | |
90 | |
84 | |
70 | |
49 |
User | Count |
---|---|
141 | |
121 | |
112 | |
59 | |
58 |