Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Dear community,
I have a question regarding time intelligence function issue. I'd like to create a measure of Total Orders - Last Year using SAMEPERIODLASTYEAR().
After I test and check the output of Year = 2014, it turns out that the Last Year value isn't blank as I expected. Instead of displaying last year result, It shows the same value with Total Orders - Current Year.
I have checked my calendar table and it has already marked as a date table. Do you know what makes the function not working properly? Please let me know if there anything I missed here. Thank you!
https://drive.google.com/file/d/1ivQuyeNZpC6gAAmVrGNhJ9znajy_0wPn/view?usp=sharing
Solved! Go to Solution.
hi @Morran ,
a VAR is a fixed value once it is defined. try like:
Total Orders - LY 2 =
CALCULATE(
DISTINCTCOUNT(Orders[Order ID]),
SAMEPERIODLASTYEAR(
'Calendar Table'[Date]
)
)+0
it worked like:
hi @Morran ,
a VAR is a fixed value once it is defined. try like:
Total Orders - LY 2 =
CALCULATE(
DISTINCTCOUNT(Orders[Order ID]),
SAMEPERIODLASTYEAR(
'Calendar Table'[Date]
)
)+0
it worked like:
User | Count |
---|---|
21 | |
14 | |
11 | |
8 | |
5 |
User | Count |
---|---|
24 | |
22 | |
20 | |
15 | |
10 |