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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
lisapduan
Frequent Visitor

Issue with calculated date range

I have a report I'm trying to modify. There is a memo field on the report that needs to contain a date range based on what dates have been entered into the date slicer. The correct range of dates are pulling but it is listing individuial dates not the date range. For the below I need date range to show as 3/1/2025-3/31/2025 instead of 3/1/2025 - 3/1/2025 or 3/12/2025-3/12/2025. I'm using Min and Max to get start date and end date for the Memo field. I.e.

(

Start Date = CALCULATE(
    MIN(XTable[Calculated date]),
    ALLSELECTED(XTable[Calculated date])
)

Any suggestions? 

lisapduan_0-1744053930164.png

 

1 ACCEPTED SOLUTION

Hi @lisapduan ,

Apologies for any earlier inconvenience. Our testing confirms that the date range logic functions as intended and meets your original requirements.

 

FYI:

Vyubandimsft_0-1745306756117.png 

 

 

Vyubandimsft_1-1745306783896.png

 

 

From your latest message, it seems a particular relationship in your data model is affecting the date context flow. This explains why the logic worked correctly when that specific table was removed.

While the DAX solution is robust, you may need to adjust your model setup slightly to ensure everything aligns perfectly.

 

I have also attached a .pbix file containing a simplified example of the working logic for your reference.

 

Regards,

Yugandhar.

 

View solution in original post

10 REPLIES 10
V-yubandi-msft
Community Support
Community Support

Hi @lisapduan ,

We noticed we haven't received a response from you yet, so we wanted to follow up and ensure the solution we provided addressed your issue. If you require any further assistance or have additional questions, please let us know.

Your feedback is valuable to us, and we look forward to hearing from you soon.

V-yubandi-msft
Community Support
Community Support

Hi @lisapduan ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

V-yubandi-msft
Community Support
Community Support

Hi @lisapduan ,

Has your issue been resolved, or do you require any further information? Your feedback is valuable to us. If the solution was effective, please mark it as 'Accepted Solution' to assist other community members experiencing the same issue.

This issue has not been resolved and put on the back burner due to other priorities. The issue seems to be more of a realationship issue. When we were backing tracking through the set up we noticed when 1 table was removed, what we were wanting to do worked. It is a critical table though so it has to be there. We are going to rebuild the model from scratch when we have time. The original was built by by someone no longer here.

Hi @lisapduan ,

Apologies for any earlier inconvenience. Our testing confirms that the date range logic functions as intended and meets your original requirements.

 

FYI:

Vyubandimsft_0-1745306756117.png 

 

 

Vyubandimsft_1-1745306783896.png

 

 

From your latest message, it seems a particular relationship in your data model is affecting the date context flow. This explains why the logic worked correctly when that specific table was removed.

While the DAX solution is robust, you may need to adjust your model setup slightly to ensure everything aligns perfectly.

 

I have also attached a .pbix file containing a simplified example of the working logic for your reference.

 

Regards,

Yugandhar.

 

lisapduan
Frequent Visitor

They are using the same date dimension. When I try this I get message "Query has exceed available resources and will not reutn anything."

Is it a separate dimension or a date field in the same table?


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Date field in the same table

Hi @lisapduan ,

Replace  YourTable [Date] with the actual table/column name.
Then, utilize this measure in your memo field display.

If you continue to encounter the "Query has exceeded available resources" error.

1. First, test it using a card visual  and Avoid using it directly in high row-level detail visuals like tables or matrices. Instead, create this measure at the page/report level and display it above the table.

Thank you @Deku , for your response.

 

Thank You.

Deku
Super User
Super User

If the dates are coming from a separate date dimension, use

 

Var minDt = min(dates[date])

Var maxDt = max(dates[date])

Return 

MinDt & " - " maxDt


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.