Forum Discussion
Countif DAX
- Anonymous8 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" ) )
Hi i have a Date set where can see 4 column of Ans1,ans2,ans3,ans4
i want to know in each column how many time 3 have got
if i would try same in excel so will do countif(seletshell,3)
Thanks in advance
akwang wrote: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 excel i would just use the CountIF Function, but DAX doesnt have this. Can anyone advise on how i can get this?
Hi,
In the Query Editor, select all column other than the 4 answer columns and click on "Unpivot other columns". Now write this measure
=CALCULATE(COUNTROWS(Data),Data[Value]<=3)
Hope this helps.