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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Is it possible to display the date as YYYYMM using segmentation and between so that the MM goes only between 01 and 12?

Hello everyone

I was wondering if it is possible to use a column that includes YearMonth; YYYYMM like 202001, 202002, etc. in a cutter with Between as an alternative, so that the part of the month (MM) goes only between 01 and 12 and no more.

When I use the Enter option in the slicer, the month numbers range from 01 to 99 even if those numbers are not present in the column, that is, the numbers are displayed as continuous and not categorical! See the screenshot for an example of what it looks like:

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 

There are many ways to get YearMonth, other than the format(), you can also use Concatenate and then change it to whole number type. Or the simplest way is just change the date format to YYYY-MM. 

Yearmonth = CONCATENATE(YEAR([Date]),MONTH([Date])) 

But it is impossible to only show Month number when you use it as slicer. You must also create a month column as a slicer.

Month = MONTH([Date]) 

yearmonth slicer.JPG

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@Anonymous 

There are many ways to get YearMonth, other than the format(), you can also use Concatenate and then change it to whole number type. Or the simplest way is just change the date format to YYYY-MM. 

Yearmonth = CONCATENATE(YEAR([Date]),MONTH([Date])) 

But it is impossible to only show Month number when you use it as slicer. You must also create a month column as a slicer.

Month = MONTH([Date]) 

yearmonth slicer.JPG

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

amitchandak
Super User
Super User

@Anonymous , If you create it as the number it is. But between slicer will not stop the user to enter a value like 201213

 

YYYYMM = format([Date],"YYYYMM")*1

 

Better you use a custom visual timeline

https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104380786?tab=Overview

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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! Prices go up Feb. 11th.

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!

Jan NL Carousel

Fabric Community Update - January 2025

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