Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
DEAR COMMUNITY,
"I want to calculate exact sameperoid last year sales value it means if today is 24 apr 23 then the measure should return only 24 days data of apr from 2022 not whole month but the measure i usre this return me the right value but it returns for whole month".
Privious Year mtd sales = CALCULATE([MTD],SAMEPERIODLASTYEAR('Calendar_new'[Date]))
Here mtd is month to date sale of our product
MTD = TOTALMTD(SUM(CUBE_INVOICE[INVOICE QUANTITY]),'Calendar_new'[Date])
Please help
Solved! Go to Solution.
Thank you for your valuable solution.
yes i can use dateadd function like this
previous year = CALCULATE([MTD],DATEADD(Calendar_new[Date],-365,DAY))
But this measure also have an issue that if previous year was leap year than it give return value of one day before not exact.
As i previously mention if today is 24 apr and previous year was leap year than it rerutn me value till 23 apr.
Thank you for your valuable solution.
yes i can use dateadd function like this
previous year = CALCULATE([MTD],DATEADD(Calendar_new[Date],-365,DAY))
But this measure also have an issue that if previous year was leap year than it give return value of one day before not exact.
As i previously mention if today is 24 apr and previous year was leap year than it rerutn me value till 23 apr.
User | Count |
---|---|
53 | |
35 | |
20 | |
15 | |
14 |
User | Count |
---|---|
94 | |
76 | |
37 | |
22 | |
18 |