We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
Hello All,,
I have a Month slicer, wherein I have pulled Month from the Date hierarchy.
This slicer is showing all the Months from Jan to Dec.
Because I have dates from Jan 2020 till April 2021
In the slicer I just want to show the current year Months... which are Jan to April.
The Top N filter for Year is not working on this.
How can I do that?
Please help!
You can create a filtered table from your date table containing the dates only for the current year like so
Current year dates = FILTER(Sheet1,Sheet1[Date].[Year] = YEAR(TODAY()))
Then you can extract the month from the date using the format function on date
Month Name = FORMAT('Current year dates'[Date],"MMMM")
Now when you use this calculated column in your slicer, you'll get only the months present in your date table for the current year dynamically without applying any filters manually as you asked.
Regards,
Aditya
Use a visual level filter
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@CNENFRNL , in this case I'll have to manually select the Current Year every time.
Can I not do it dynamically?..the slicer should display current year's months at all times.
Thanks!
User | Count |
---|---|
13 | |
12 | |
8 | |
8 | |
6 |
User | Count |
---|---|
28 | |
19 | |
13 | |
11 | |
7 |