cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johanbakx
Frequent Visitor

Measure for count if function

Hi all,

 

I am looking for a very simple measure that works exactly the same as the count if function in Excel. 

 

I have a column named "Justified/Non-justified" and in that column there are 2 different values: Justified and Non-justified.

 

I would like 2 measures; one to count the number of times "Justified" appears in that column, and the other measure must do the same for "Non-justified" .

 

Hoping for your help!

Regards, Johan

1 ACCEPTED SOLUTION
Greg_Deckler
Super User IV
Super User IV

So, in general to replicate COUNT IF, you use CALCULATE with the appropriate FILTER clause.


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Greg_Deckler
Super User IV
Super User IV

So, in general to replicate COUNT IF, you use CALCULATE with the appropriate FILTER clause.


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Sorry for the late reply, but this indeed works! Thanks!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors