The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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:
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:
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:
I'm using DAY/MONTH/YEAR in this project.
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