Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

'FILTER' Function Help!

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 Projec...
  • smpa01's avatar
    2 years ago

    Anonymous  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"))