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
Anonymous
Not applicable

Filtering table and summing the the number of times it occurs

Hi All,

 

Im currently working on a project to measure our influence/impact on social media currently. 

 

What I am trying to achieve is a DAX formula that will:

a) filter the sentiment column,1 through 5. So I looking at 5 DAX formulas altogether

b) Sum the number of occurances it had occurred, using the occurances field. 

 

Some of the data:

 

abdalahmed_0-1640257304499.png

 

What I have achieved so far is but its showing as an error.

 

M_Count_Negative = SUMX(FILTER(sentimental_value, sentimental_value[Sentiment]=5),sentimental_value[Occurances])

 

 

Regards

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , The formula seems correct,what is the result you are getting and what is expected 

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi Amit,

 

I had a look at the data type of each column and the Sentiment value was not given the correct datatype. It was a text datatype and NOT a whole number. I had now changed this and it is working correctly.

 

Thank you

amitchandak
Super User
Super User

@Anonymous , The formula seems correct,what is the result you are getting and what is expected 

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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