# COUNTIFS Multiple Criteria in Power BI



## VBE313 (Jan 12, 2021)

How can I create a measure in Power BI that is like the formula in cell E2? I want to count the number of Orders that are "LESS THAN Today" and "LESS THAN 100% Complete".


----------



## VBE313 (Jan 12, 2021)

Solved


```
Total Late = COUNTROWS(
FILTER(
ALL(Table1),
Table1[Customer Due Date] < TODAY() && Table1[Percent Complete] < 1
)
)
```


----------



## nburaq (May 30, 2022)

Hi,
I have similar issue and trying to solve my problem in power pivot writing a measure; I have achieved to solve my problem actually using excel function but I want to solve it using dax and measure

In this data, there are years where problem occurred, event descriptions and finally lost hours.
As a rule, to call an event as a cause;

Same event should happen 4 times or more in that year. In this case, total lost hours might be less than 8 hours
Same event might happen less than 4 times in that year. In this case, total lost hours should be more than 8 hours
I will be so glad if you could help me to create a dax measure look similar to my excel formula. Thanks help and comments!

Test.xlsxABCDEFGHIJK1PlantDepartmentDescription  Lost hoursLost TonsYearQuarterMonthMonth NameWeekCause2SRIProductionLow Pressure Pump A2,6221202225May21No3SRIProductionBroken Chain Drive B2,1182202225May21No4SRIProductionBroken Chain Drive A0,868202225May20No5SRIProductionBroken Chain Drive B1,5130202225May20No6SRIProductionA1234TT0,974202225May20No7SRIProductionA1234TT0,14202225May20No8SRIProductionB758PT0,642202225May20No9SRIProductionB758PT0,14202225May20No10SRIProductionSDT0,323202225May20No11SRIMaintenanceSDT0,426202225May20No12SRIProductionBroken Roller0,217202225May20No13SRIProductionBroken Pump A2148202225May20No14SRIProductionBroken Pump A0,429202225May20No15SRIProductionGrinder B dwon189202225May20No16SRIProductionDowntime 0,213202225May20No17SRIMaintenanceDowntime 0,19202225May20No18SRIProductionGrinder B dwon03202225May20No19SRIProductionB758PT0,329202225May20No20SRIProductionStart up after downtime0,215202225May20No21SRIProductionLow Temperature Heater A1,4122202225May20No22SRIOtherSdt17,11,265202225May20Yes23SRIProductionLow Temperature Heater A02202225May20No24SRIProductionBroken Roller0,649202225May20No25SRIOtherSdt241,775202225May20Yes26SRIProductionBroken Bolt Pump A03202225May20No27SRIProductionBroken Bolt Pump A1,6138202225May20No28SRIProductionValve problem 0,112202225May20No29SRIOtherValve problem 0,110202225May20No30SRIOtherSDT16,71,234202225May20Yes31SRIMaintenanceBroken Bolt Pump A185202225May20No32SRIProductionA1234TT03202225May20No33SRIProductionTurbine failure0,324202225May20No34SRIProductionStart up after downtime1,191202225May20No35SRIProductionTurbine failure0,763202225May19No36SRIOtherNo power1,195202225May19No37SRIOtherNo power0,978202225May19NoSheet1Cell FormulasRangeFormulaK2:K37K2=IF(COUNTIFS(C:C,'UDT Analysis.xlsx'!#REF!,F:F,'UDT Analysis.xlsx'!#REF!)>3,"Yes",IF(SUMIFS(D:D,C:C,'UDT Analysis.xlsx'!#REF!,F:F,'UDT Analysis.xlsx'!#REF!)>7,"Yes","No"))


----------

