Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Same date range last year to date

Hello I have a time intelligence problem...

 

  • First measure : 

I have these formula which work as expected : 

Event_Date_Max = CALCULATE(
    MAX(Events[event_date]),
    ALLEXCEPT(Events, Events[Codecourtier])
)
NB_Devis_après_event =
 var a =  [Event_Date_Max]
 var b = CALCULATE(ENDOFYEAR(dim_date[Date]),dim_date[Annee]=2023)
var afn_ = CALCULATE(sum(Devis_courtiers[Nombre de devis]),Devis_courtiers[DATE_CREATION]> a , Devis_courtiers[DATE_CREATION] < b )
return  afn_
 
  • Second measure :

I need to make the same calculation for the exact period last year. The event date of N should be the same day of 2022.

The row context should be in 2023 although the underlaying data originate from 2022

In simple term, i should be able to compare the first and the second measure on a 2023 date axis with a daily breakdown

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

     

    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.