Forum Discussion

Tadadada's avatar
Tadadada
New Member
1 year ago
Solved

How to Count in DAx

I have a table with MonthNum and patients. I want to count patient per month using month number. Thank you
  • Poojara_D12's avatar
    1 year ago

    Hi Tadadada 

    To count patients per month based on the MONTHNUM column, use this DAX formula:

    Patient Count = COUNTROWS(FILTER(TableName, TableName[MonthNum] = SELECTEDVALUE(TableName[MonthNum])))

    Replace TABLENAME with your actual table name.

    This formula counts rows where the MONTHNUM matches the current month context in your visual, giving you a monthly patient count.

     

    Did I answer your question? Mark my post as a solution, this will help others!

    If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

    Kind Regards,
    Poojara
    Data Analyst | MSBI Developer | Power BI Consultant
    YouTube: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS