Forum Discussion
SAMEPERIODLASTYEAR with previous date filter
- Anonymous5 years ago
Hi DavidEg
My Sample:
I add YearMonth into Page filter and select 202101 and 202112.
Please try my measure:
N_TicketsOpening_LY = VAR _CurYear = YEAR(MAX(CCBI_vwTickets[OpeningDate])) Return CALCULATE(COUNT(CCBI_vwTickets[TicketId]),FILTER(ALL(CCBI_vwTickets),YEAR(CCBI_vwTickets[OpeningDate])=_CurYear-1))Result is as below.
If this reply still couldn't help you solve your problem, please show me a sample like what you are dealing with by your Onedrive for Business.
This will make it easier for me to understand your requirement.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi DavidEg
My Sample:
I add YearMonth into Page filter and select 202101 and 202112.
Please try my measure:
N_TicketsOpening_LY =
VAR _CurYear = YEAR(MAX(CCBI_vwTickets[OpeningDate]))
Return
CALCULATE(COUNT(CCBI_vwTickets[TicketId]),FILTER(ALL(CCBI_vwTickets),YEAR(CCBI_vwTickets[OpeningDate])=_CurYear-1))
Result is as below.
If this reply still couldn't help you solve your problem, please show me a sample like what you are dealing with by your Onedrive for Business.
This will make it easier for me to understand your requirement.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.