The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
HI,
I have a very simple question.
On this simple sheet as below, I counted # of ID of <50 score, using countif in excel,
as =COUNTIF(B2:B21, "<50")
How do I manage it in DAX?
Many thanks in advance.
ID | Score |
520001 | 55 |
520002 | 36 |
520003 | 52 |
520004 | 52 |
520005 | 50 |
520006 | 50 |
520007 | 43 |
520008 | 43 |
520009 | 47 |
520010 | 43 |
520011 | 32 |
520012 | 43 |
520013 | 40 |
520014 | 59 |
520015 | 32 |
520016 | 43 |
520017 | 50 |
520018 | 47 |
520019 | 36 |
520020 | 28 |
Solved! Go to Solution.
Hi @Nobuko_ao
You can use this MEASURE
Measure = CALCULATE ( COUNTROWS ( Table1 ), Table1[Score] < 50 )
or this one
Measure 2 = COUNTROWS ( FILTER ( Table1, Table1[Score] < 50 ) )
or this one
Measure 3 = COUNTX ( FILTER ( Table1, Table1[Score] < 50 ), 1 )
Hi @Nobuko_ao
You can use this MEASURE
Measure = CALCULATE ( COUNTROWS ( Table1 ), Table1[Score] < 50 )
or this one
Measure 2 = COUNTROWS ( FILTER ( Table1, Table1[Score] < 50 ) )
or this one
Measure 3 = COUNTX ( FILTER ( Table1, Table1[Score] < 50 ), 1 )
Thank you !!
My problem has solved succesfully!!
best
Nobuko
User | Count |
---|---|
65 | |
62 | |
59 | |
54 | |
28 |
User | Count |
---|---|
181 | |
82 | |
66 | |
47 | |
44 |