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

View all the Fabric Data Days sessions on demand. View schedule

Reply
JLambs20
Helper III
Helper III

Calculated Column that counts the total instances of a value in a column

Hello,

I need to create a calculated column ("Count" in this example) that will count the total number of instances of a value in another column (will also potentially need to filter based on other values in a row). 

Here's a sample of data for what I need:

 

DateValueCount
1/1/2023X3
1/1/2023X3
1/1/2023X3
1/2/2023Z2
1/2/2023Z2
1/3/2023Z1

 

The 3rd column needs to show how many times value "X" (or Z or....) shows up in the value column but also filtered by the date (and maybe other criteria).  So here, X shows up 3 times on 1/1/23 whereas Z shows up twice on 1/2/23 and but only shows up once on 1/3/23.  

Thank you for your help!

1 ACCEPTED SOLUTION

3 REPLIES 3
Ahmedx
Super User
Super User

look at my solution to see if it suits you

Calculated Column.pbix

Hello and thank you for providing a potential solution.  Unfortunately, my company does not allow me to download files from one drive.  Is it possible to just paste the DAX formula here and I can give it a try?

pls try this

Screenshot_3.png

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