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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
gluizqueiroz
Resolver I
Resolver I

Simple MIN and MAX skips some days when date is selected in slicer

I have a normal DateDimension, created by CALENDAR() and that table has dates from 2010-01-01 to 2020-01-31 and of course, the table has 2019-11-01, 2019-11-02, 2019-11-03, 2019-11-04, 2019-11-05. Like the following image:

 

image.png

 

But I'm struggling with a confusing problem that is: I created a simple measure like the following and it not returns the correct MAX().

 

MinMaxPeriod = MIN(DateDimension[DateKey]) & " ~ " & MAX(DateDimension[DateKey])

 

It returns 2019-11-01 ~ 2019-11-03 even if I selected on a slicer 2019-11-01 to 2019-11-02, like the following image:

 

image.png

 

The problem not occur for every days, I tried another days and it worked, I was lucky to find this specific days. I have problem with MIN() too, like the following image:

image.png

 

I'm using DAY/MONTH/YEAR in this project.

2 REPLIES 2
amitchandak
Super User
Super User

Try

MinMaxPeriod = MINX(DateDimension,DateDimension[DateKey]) & " ~ " & MAXX(DateDimension,DateDimension[DateKey])

or 
MinMaxPeriod = MINX(allselected(DateDimension[DateKey]),DateDimension[DateKey]) & " ~ " & MAXX(allselected(DateDimension[DateKey]),DateDimension[DateKey])

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hey @amitchandak.

I tried both your solutions, but it still doesn't work.

 

 

image.png

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors