Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I have a report where the sameperiodlast year measure isnt working. I am getting the result for the full year 2018 rather than Jan 18.
total billed = sum('Recruitment Live'[BILL_AMOUNT])
calendar = CALENDAR(date(2018, 1, 1), date(2019, 12, 31))
2018 = CALCULATE([total billed],SAMEPERIODLASTYEAR('calendar'[Date]))
what has me stumped is that the report worked correctly when i had the calendar set for 2017 -2018 dates
calendar = CALENDAR(date(2017, 1, 1), date(2018, 12, 31))
what could i be missing?
Solved! Go to Solution.
Hi @Anonymous,
You can also refer to following link to manually set up filter date range for calculation:
Time Intelligence "The Hard Way" (TITHW)
Regards,
Xiaoxin Sheng
Hi @Anonymous,
You can also refer to following link to manually set up filter date range for calculation:
Time Intelligence "The Hard Way" (TITHW)
Regards,
Xiaoxin Sheng
Hi Ludzie,
SAMEPERIOSLASTYEAR will return a set of dates shifted one year back in time. This is a special variation on DATEADD.
totalBilled_PY= CALCULATE( [Bill_Amount], SAMEPERIODLASTYEAR( 'Calendar'[Date] ) )
OR
PY_totalBilled = CALCULATE( [Bill_Amount], DATEADD( ( 'Calendar'[Date]., -1, YEAR ) )
You have to make sure your calendar table includes dates for the previous year in order for the comparison to be made. Your calnedar tabl sholuld contain dates to cover the dates in your Recruitment_Live table.
Yes thats what i am expecting i.e i should see the results as at Jan 2018 but i am getting the total bill amount for 2018 (Jan-dec)
I have changed the calendar from the above to calendarauto to ensure the range of recruitment_live is covered
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |