Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have data like this :
Date | Unit Sales |
Jan-97 | 63 |
Feb-97 | 26 |
Mar-97 | 20 |
Apr-97 | 41 |
May-97 | 83 |
Jun-97 | 40 |
Jul-97 | 88 |
Aug-97 | 95 |
Sep-97 | 74 |
Oct-97 | 67 |
Nov-97 | 52 |
Dec-97 | 10 |
Jan-98 | 35 |
Feb-98 | 75 |
Mar-98 | 32 |
Apr-98 | 46 |
May-98 | 37 |
If I want to calculate YTD 1997, it's not Full Year in 1997 but until May 1997 like YTD 1998 until May 1998. So do I if I want to calculate YTD 1996, it's until May 1996. Thanks for the solution
Hi. First of all you need to understand that any time intelligence calculations work with a Date Table. Date table are necesary so the engine can run specific time calculations la year to date. Once you hace this data model prepared you can create a measure like this:
Measure YTD = CALCULATE ( [Measure Unit Sales], DATESYTD ( 'DateTable'[Date], "04/30" ) )
Happy to help!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
17 | |
8 | |
7 | |
7 | |
6 |
User | Count |
---|---|
23 | |
11 | |
10 | |
9 | |
8 |