Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
bourne2000
Helper V
Helper V

How to calculate count for different date values?

Hi

 

I am having below table

 

bourne2000_0-1627981802952.png

 

I want to calculate the count of "Yes" for each date as well as total counts for each date and do the ratio. I need to have below table

 

bourne2000_1-1627981830604.png

 

My date has more than 2000 records with 200 different dates.  I am not sure how to do this DAX calculation? Can anyone advise this?

1 ACCEPTED SOLUTION
nvprasad
Solution Sage
Solution Sage

HI,

 

CountofYES = calculate(counta(table[datecolumn]),table[category]="YES")
Countofall = counta(table[datecolumn])

Ratio = divide(Count_of_YES,Count_of_all,0)

 

Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂

Regards,
N V Durga Prasad

Did I answer your question? Mark my post as a solution! Appreciate your Kudos.
Follow me on LinkedIn.

View solution in original post

1 REPLY 1
nvprasad
Solution Sage
Solution Sage

HI,

 

CountofYES = calculate(counta(table[datecolumn]),table[category]="YES")
Countofall = counta(table[datecolumn])

Ratio = divide(Count_of_YES,Count_of_all,0)

 

Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂

Regards,
N V Durga Prasad

Did I answer your question? Mark my post as a solution! Appreciate your Kudos.
Follow me on LinkedIn.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors