Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Getting the from and till dates from a between two dates slicer

Hello,   I use a table F_DOSSIERS with the fields EMPLOYEE, REGION, OFFICE, CREATION_DATE, AMMOUNT_DOSSIERS:   I added a slicer to my report based on the field CREATION_DATE:      ...
  • v-xicai's avatar
    6 years ago

    Hi Anonymous ,

     

    You may create measures like DAX below.

     

    Measure Min Date = CALCULATE(MIN (F_DOSSIERS[CREATION_DATE]), ALLSELECTED(F_DOSSIERS[CREATION_DATE]))
    
    
    
    Measure Max Date = CALCULATE(MAX (F_DOSSIERS[CREATION_DATE]), ALLSELECTED(F_DOSSIERS[CREATION_DATE]))
    
    
    
    Measure Start = EOMONTH([Measure Min Date], -1)+1
    
    
    
    Measure End = EOMONTH([Measure Max Date], 0)
    
    
    
    Measure Start Previous Year = EOMONTH([Measure Min Date], -13)+1
    
    
    
    Measure End Previous Year = EOMONTH([Measure Max Date], -12)

     

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

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