Forum Discussion
Measure to create Sales Amount
- 8 years ago
Hi Anonymous,
You could follow the steps below to get your excepted result.
1. You should create a DateTable and create a relationship between the DateTable and Amounts table.
DateTable = CALENDARAUTO()
2.You could create the measure below to get your desired result.
lastyear_Amount =
CALCULATE (
SUM ( Amounts[sales Amount] ),
SAMEPERIODLASTYEAR ( 'DateTable'[Date] )
)Then you will get the result below.
For details, you could refer to my test pbix file.
Best Regards,
Cherry
Hi Anonymous,
You could follow the steps below to get your excepted result.
1. You should create a DateTable and create a relationship between the DateTable and Amounts table.
DateTable = CALENDARAUTO()
2.You could create the measure below to get your desired result.
lastyear_Amount =
CALCULATE (
SUM ( Amounts[sales Amount] ),
SAMEPERIODLASTYEAR ( 'DateTable'[Date] )
)
Then you will get the result below.
For details, you could refer to my test pbix file.
Best Regards,
Cherry
- Anonymous8 years agoNot applicable
Hi v-piga-msft,
Thank you for the valuable reply.I have already applied the same logic but i got another challenge Power BI does not support the Calendar table in direct query method.