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!

 



Source link

Leave a Comment