Forum Discussion
blackavipowerbi
4 years agoRegular Visitor
Last year same "DAY" not working
Hello, i have made the table as the image. I select the day that i want to compare with the same month, last year at the same day. In the corrent month, last year is not working. Can someone help me?...
- Anonymous4 years ago
Hi blackavipowerbi,
Perhaps you can try to use the following formulas if helps:
Qtd. de Atendimentos = VAR curr = MAX ( 'ATD'[MATRÍCULA] ) RETURN CALCULATE ( COUNTA ( 'ATD'[MATRÍCULA] ), FILTER ( ALLSELECTED ( 'ATD' ), 'ATD'[MATRÍCULA] <= curr && QUARTER ( 'ATD'[MATRÍCULA] ) = QUARTER ( curr ) && YEAR ( 'ATD'[MATRÍCULA] ) = YEAR ( curr ) - 1 ) )Regards,
Xiaoxin Sheng
amitchandak
Super User
4 years agoblackavipowerbi , Make sure ATDCalendario is date table and marked as Date table(Option on right click of the table)
Also, hoping measure [Qtd. de Atendimentos] is not using any time intelligence function
blackavipowerbi
4 years agoRegular Visitor
Tks!!! Qtd. de Atendimentos calc is like this:
Qtd. de Atendimentos =
CALCULATE(
COUNTA('ATD'[MATRÍCULA]),
FILTER(
ALLSELECTED('ATD'[MATRÍCULA]),
ISONORAFTER('ATD'[MATRÍCULA], MAX('ATD'[MATRÍCULA]), DESC)
)
)