Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
there are dates from 2017/1/1 to2018/9/6
when i create a table: table = datesinperiod ('sheet1'[date] , max('sheet1'[date]) , -1,year),the result is that it starts from 2017/10/1 to 2018/9/6,just 341days.
if i try : table = datesinperiod ('sheet1'[date] , date (2018,9,1), -1 ,year),the result is correct ,from 2017/9/2 to 2018/9/1
and other dates are also correct ,just the max(date) is wrong ,what is the problem?
thanks very much,guys.
Solved! Go to Solution.
i have used calendar to create the table.now i can use datesbetween('sheet'[date],edate(max('sheet'[date]),-12)+1,max('sheet'[date])) to avoid this problem. thank you.
I think you're probably getting into trouble here by not using a proper Dates table. DATESINPERIOD needs a contiguous dates table to work correctly. That's just an educated guess since I can't see your data.
--
If you want to create a dates table use CALENDAR function.
i have used calendar to create the table.now i can use datesbetween('sheet'[date],edate(max('sheet'[date]),-12)+1,max('sheet'[date])) to avoid this problem. thank you.
User | Count |
---|---|
84 | |
70 | |
68 | |
58 | |
50 |
User | Count |
---|---|
43 | |
41 | |
34 | |
34 | |
30 |