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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Acquiring data from a specific start date

Hi all,

 

I'm new to PowerBI at my company and I'm trying to setup a measure that pulls data from one table, that was created at the beginning of the year.  I have tried a few iterations of the date function with Calculate(Sum), but to no avail.   

 

Eventually I'd like to specify quarters, but for now since I'm so new, I'd like to have the measure specify that any data created after a specific date, would be drawn into the graph when selected.  

 

Thanks for any and all help!

 

LD

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I appreciate the suggestions,

 

I completely overlooked the TotalYTD option, so I spent a lot of time on a simple solution.

 

This should return all the data I need for now, but I'll keep the suggestions if I need to incorporate further information.

 

Thanks so much!

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I appreciate the suggestions,

 

I completely overlooked the TotalYTD option, so I spent a lot of time on a simple solution.

 

This should return all the data I need for now, but I'll keep the suggestions if I need to incorporate further information.

 

Thanks so much!

AlexAlberga727
Resolver II
Resolver II

Static date, or dynamic?

 

There is a DAX expression to gather the difference between dates if needed.

 

DATEDIFF(date1,date2,interval)

 

Example of how to write the difference between 2 dates using variables and the DATEDIFF DAX.

Difference Between Days = 

VAR Day1 = MIN( fSales[InvoiceDate] )
VAR Day2 = MAX( fSales[InvoiceDate] )

RETURN
DATEDIFF( Day1, Day2 , DAY )

 

Sales from XDATE to YDATE = 

VAR X = DATEADD( dDateTable[Date] , -90 , DAY )
VAR Y = TODAY()-1

RETURN

CALCULATE( [Total Revenue], DATESBETWEEN( dDateTable[Date], X , Y )

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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