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! Learn more

Reply
Stja01
New Member

How to set up count of filter (month)

Hello, 

I have inherited a BI sheet and am trying to add some additional power to our reporting. 

I'm currently working on finding exact profit depending on how many months are selected in the slicer. For example, a client has a service fee of 2,471 in a month and we work so many hours in the time selected. 

 

I think I need to get a count of months selected in order to then multiply by the service fee. It's the count that's catching me. 

I have both 'DimDate'[Month] which spits out an integer (1-12) corresponding to the month. and 'DimDate'[Month Name] that like the name says gives the month name. E.G. January

 

I have tried this; 

countofmonth = IF(ISFILTERED(DimDate[Month Name]), COUNTROWS(VALUES(DimDate[Month Name])),0)
Which does not work for me. With either month or month name
I have tried with ISFILTERED alone as well, but could not apend Count onto that function.
 
at one point I had this working with single selected months, but it needs to report for multiple months selected.
 
Thank you so much if you can help me!
 
2 REPLIES 2
vicky_
Super User
Super User

Try swap out VALUES for ALLSELECTED()

Unfortunatly no change. Count of month still outputs 0.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.