Forum Discussion

hkpowerbi's avatar
hkpowerbi
Regular Visitor
9 years ago
Solved

Help with equivalent of WHERE

Hi All, I need some help in creating a formula. Say I have a field for "Total Hours." In addition, I have another field for Region, where region can be US or Canada.   Now, if I wanted Total Hours ...
  • parry2k's avatar
    9 years ago
    Total Hours Canada = CALCULATE(SUM(Table[Total Hours]), FILTER(Table, Table[Regions]="Canada")
    
    Total Hours US = CALCULATE(SUM(Table[Total Hours]), FILTER(Table, Table[Regions]="US")