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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
bdehning
Post Prodigy
Post Prodigy

Count number of Months

I use a Filter Slicer where uses select filter dates.     How could I show in a table the total number of months that were selected in the Slicer   So below would be 4.   

bdehning_0-1717800982293.png

 

 

1 ACCEPTED SOLUTION

I am actually using [Month Short] Text field and [Year] Whole Number for my X-Axis in my Visual which is controlled by Slicer Selection of filter date for [Date Completed]

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Very confused about your requirement.  How is the difference b/w those 2 dates 4 months?  Also, how can you show 4 months in a table.  Wouldn't you want to show the result in a card visual.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Do you have a YearMonth column in your calendar table?  In that case the formula would be count(distinct(Dates[YearMonth]))

I am actually using [Month Short] Text field and [Year] Whole Number for my X-Axis in my Visual which is controlled by Slicer Selection of filter date for [Date Completed]

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!