Forum Discussion

janinw's avatar
janinw
Icon for Helper I rankHelper I
6 years ago
Solved

Get date from page filter

Hi all,   I am building a dashboard in which I have a date/CW/month/quarter/year hierarchy. The consumer can set a filter and the dashboard will then display the results for the specified time fram...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi janinw ,

     

    Use below DAX to get this done,

    Max_Date = CALCULATE(MAX('Date'[Date]),ALLSELECTED('Date'))
    Min_Date = CALCULATE(MIN('Date'[Date]),ALLSELECTED('Date'))
    Target = DATEDIFF(Min_Date,Max_Date,Day)*daily Target

    Find the below screenshot FYR..

    For October Month:
    Oct Month ->Week 41:
    Oct Month-> Week 43:
     
    Best Regards,
    @Mail2inba4

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