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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
vamsi_vk
New Member

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 @vamsi_vk ,

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
Helper I
Helper 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.

vamsi_vk
New Member

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
Helper I
Helper 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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