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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.