Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
Solved! Go to Solution.
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!
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!
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 )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
10 | |
10 | |
9 | |
7 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |