The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
This is my original form sheet1
date quantity
2017/1/1 1
2017/1/2 1
2017/1/3 1
2017/3/25 1
2018/3/5 1
then i use calendar(FIRSTDATE('Sheet1)'[date]),LASTDATE('(Sheet1)'[date]))) to create a table, it has dates from 2017/1/1 to 2018/3/5
create a function
last year=CALCULATE(SUM('Sheet1'[quantity]),SAMEPERIODLASTYEAR('表'[Date]))
for 2018,why it shows 4?
the max day is 2018/3/5,Its previous year's date is 2017/3/5 ,sameperiodlastyear should return dates before,it should return 2017/1/1,2017/1/2,2017/1/3
why the result is 4?not 3?
Solved! Go to Solution.
Hii @toziu
In your scenario, you used the sameperiodlastyear function to calculate the quantity of the whole previous year, 2017.
sameperiodlastyear - It does not consider the date; it only considers the whole year.
Thank you
Hii @toziu
In your scenario, you used the sameperiodlastyear function to calculate the quantity of the whole previous year, 2017.
sameperiodlastyear - It does not consider the date; it only considers the whole year.
Thank you
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
79 | |
71 | |
48 | |
41 |
User | Count |
---|---|
136 | |
108 | |
71 | |
64 | |
58 |