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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Issue in displaying date format

Hi,

 

I have a date format in a slicer like 202106 and 202405. I want to show these dates in an alphabetical way like
"June 2021 to May 2024". 
I have data from the backend that starts from 1990 and ends in 2040 as a date range. When I try to select the date range if I change the minimum date it defaults to 1990 likewise with the maximum date range it defaults to 2040.
This is how it looks 

vamsi_vk_0-1715752138595.png

 


I need to display the range as per my selection. can somebody help me out with this issue? Please

8 REPLIES 8
vk_veluvolu
Frequent Visitor

l am using a default two year slicer along with the period slicer.
default two year is where I am displaying data for the last two years automatically if I reset in power bi service.
I have synced the normal date slicer and this two year default slicer. 

when I try to change the "To Date" it is by default showing the minimum date as below.

vk_veluvolu_0-1715942620063.png

As in above usual date I have is 202405 in the "To Date", I have changed it to 202401.
after changing "From Date" defaulted to minimum date of my backend date from server.

v-cgao-msft
Community Support
Community Support

Hi @Anonymous ,

Suppose we have:

vcgaomsft_0-1715827893056.png

Please create a new measure:

Measure = CALCULATE(MIN('Date'[Month Year]),'Date'[Year Month]=MIN('Date'[Year Month])) & "-" & CALCULATE(MIN('Date'[Month Year]),'Date'[Year Month]=MAX('Date'[Year Month]))

output:

vcgaomsft_1-1715827973420.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Hi,

 

Please help me with this issue as you have given a solution and it worked halfway through my process.
to go in detail. here's below

l am using a default two year slicer along with the period slicer.
default two year is where I am displaying data for the last two years automatically if I reset in power bi service.
I have synced the normal date slicer and this two year default slicer. 

when I try to change the "To Date" it is by default showing the minimum date as below.

vk_veluvolu_0-1715944954198.png

 

As in above usual date I have is 202405 in the "To Date", I have changed it to 202401.
after changing "From Date" defaulted to minimum date of my backend date from server.

Hi,

Thank you for the help. The solution you have shared helped me through halfway.

If I try to choose the range of dates in "To Date" side, the "From Date" is going to minimum value as shown below.

vk_veluvolu_0-1715942112821.png

This is happening only when I select the "To Date". 
can you help me to make it as per my selection.

 

AsNa_92
Resolver I
Resolver I

is this a text box?

AsNa_92_0-1715759258259.png

Try to create a table and in the values put the earlist date and latest date:

AsNa_92_1-1715759355009.png

 

Hi,

Yes, I have used text box for that to display the selected dates. 
creating a table and used the date as you have mentioned. It didn't work out.

 

my apologies, I might not be more specific about the issue. Let me try to explain clearly.

As I have taken a slicer(between[to be specific]) "from date" and "to date". If I try to change from date and entered a date, the "to date" automatically goes to 2040. Cause it is choosing the max date from the table .

vk_veluvolu_0-1715836644831.png

 

Likewise, with the minimum date.
If I select any specific date either from or to date, I want to see the exact same dates to be displayed as the input.
Thanks in advance.

Anonymous
Not applicable

As shown in the screenshot

vamsi_vk_0-1715758018715.png

If I try to choose "To Date" which is 202405, currently we are in May 2024 which is the latest. It should display May 2024 instead of January 2040. Even if I choose any future dates from now, automatically it should replicate the selection which I made but, by default, it is choosing the max date which we have given at the backend level.
Likewise, the same with the "From Date". It defaults to 1990.

Also, I have made a custom date format which displays only the Year and month in the slicer.


AsNa_92
Resolver I
Resolver I

Hi,

 

Could you be more specified in what range you want the period be seletced? 

From what I understand from backend you have range from 1990 till 2040.

Also, how did you changed the minimum and maximum of the date range?

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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