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.
Hi @rajanimaddala ,
In order to calculate last year sales you can use any measure out of below 4 mentioned:
1. Last Year Sales = CALCULATE(SUM([Total Sales]),DATEADD([Date]),-1,YEAR))
2. Last Year Sales = CALCULATE(SUM([Total Sales]),PREVIOUSYEAR([Date]))
3. Last Year Sales = CALCULATE(SUM([Total Sales]),PARALLELPERIOD([Date],-1,YEAR))
4. Last Year Sales = CALCULATE([Total Sales], SAMEPERIODLASTYEAR(‘Calendar’ [Date]))
Please give Thumps up for Support and accept this as a solution if it helps you!
Hi @rajanimaddala ,
Your YTD looks a little weird. Do you want a measure similar to the following:
Sales YTD =
VAR _lastdate =
DATE ( YEAR ( NOW () ) - 1, MONTH ( NOW () ), DAY ( NOW () - 1 ) )
RETURN
SUMX ( FILTER ( table, salesdate <= _lastdate ), salesvalue )
If it doesn't meet your requirement, kindly share your sample data and expected result if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |