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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Hasan_iba
Helper II
Helper II

Month and year in one slicer

Hello Power BI Experts. Hope all of you are doing great!! I am currently having an issue. I am looking to have one single slicer which will contain both years and months. At the moment, I have not been able to find a solution to this. Is there a way to achieve what I am looking for? Here is the link to the pbix file I am working with: https://drive.google.com/file/d/0B0XwYvmbIN12M3ZLNlAwM0NVVFk/view?usp=sharing

 

A prompt solution will he highly appreciated. Thanks

Hasan

2 ACCEPTED SOLUTIONS
prathy
Advocate III
Advocate III

Hi ,

Capture.PNG

 

 

Have you looked into Power Bi Custom Visual Time line, that may solve your issue - https://app.powerbi.com/visuals/show/Timeline1447991079100

 

Or you can use HierarchySlicer - https://app.powerbi.com/visuals/show/HierarchySlicer1458836712039

 

 

Regards,

Prathy

 

 

View solution in original post

v-shex-msft
Community Support
Community Support

Hi @Hasan_iba,

 

You can simply add a calculated column "month year" to your calendar table, then use it as the source of slicer.

 

Month Year= FORMAT([Date],"mmmm yyyy")

 

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

8 REPLIES 8
v-shex-msft
Community Support
Community Support

Hi @Hasan_iba,

 

You can simply add a calculated column "month year" to your calendar table, then use it as the source of slicer.

 

Month Year= FORMAT([Date],"mmmm yyyy")

 

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Hi,
With this approach, you cannot analyze data in terms of Y-1 because the year and month cease to be date type and become text.

Anonymous
Not applicable


You can simply add a calculated column "month year" to your calendar table, then use it as the source of slicer.

 

Month Year= FORMAT([Date],"mmmm yyyy")

 

Regards,

Xiaoxin Sheng


 

IMO this is a terrible "solution". Doing this makes the field a text field by default meaning the values sort alphabetically in the slicer, which is a real pain for users. Additionally, the slicer only provides List and Dropdown options.

 

Alternatively, if you change the data type from text to date the slicer then reverts to day level selections and therefore it doesn't meet the need of selecting a Year + Month data range... E.G. "2016 January" to "2017 October"

 

The other Timeline Slicer add-in that was suggested is right on the money.

 

 

 

 

prathy
Advocate III
Advocate III

Hi ,

Capture.PNG

 

 

Have you looked into Power Bi Custom Visual Time line, that may solve your issue - https://app.powerbi.com/visuals/show/Timeline1447991079100

 

Or you can use HierarchySlicer - https://app.powerbi.com/visuals/show/HierarchySlicer1458836712039

 

 

Regards,

Prathy

 

 

Anonymous
Not applicable

Dear @prathy,

 

Which visual did you use for your Filter?

Can you show me please?

image.png

Thanks & Regards,

ManNVSM.

Anonymous
Not applicable

Thank you @prathy Smiley Happy

Hi @prathy, Thanks for the suggestion. Will have a look into it. The timeline looks great. It should do the job. Thanks again!!

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.