Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have a table with MonthNum and patients. I want to count patient per month using month number.
Thank you
Solved! Go to Solution.
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
Poojara,
This solution is just what I needed. Thank you
Helo @Tadadada ,
You can create a measure for the same.
PatientsPerMonth =
CALCULATE(
COUNT('YourTable'[patients]),
ALLEXCEPT('YourTable', 'YourTable'[MonthNum])
)
I hope this helps.
Mark this as solution if this helps or give a thumbs up.
Cheers.
divyed,
Thank you for your help
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
hi @Tadadada ,
just plot a visual with monthnumber column and a measure like:
count = DISTINCTCOUNT(tablename[patient])
or?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |