Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
36 | |
33 | |
18 | |
18 |