Forum Discussion

akwang's avatar
akwang
Advocate II
8 years ago
Solved

Countif DAX

Hi I have a table with a column for order status which could either be "on time" or "delayed". I want to create a MEASURE for Total Orders delayed that will tell me how much orders were delayed. In e...
  • Anonymous's avatar
    Anonymous
    8 years ago

    CALCULATE and FILTER are the first two things you need to learn about DAX.

     

    Measure = CALCULATE(
    	COUNT(TableName[Column That Identifies Unique Orders]),
    	FILTER(
    		TableName,
    		TableName[Delay Status] = "On Time" ||
    		TableName[Delay Status] = "Delayed"
    	)
    )