Forum Discussion

jdubs's avatar
jdubs
Helper V
1 year ago
Solved

Quick Measure --> Filter by Relative Date?

When creating a quick measure I can filter a column by a corresponding date column but it only allows me to select individual dates. How would I expand this to Relative Date e.g. last 12 months?   ...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi jdubs ,

     

    Please try this measure:

    Measure = 
    VAR __today = TODAY()
    VAR __start_date = EDATE(__today, -12)
    VAR __result = CALCULATE([Count of Title],'Table'[createdon]>=__start_date && 'Table'[createdon]<__today+1)
    RETURN
    __result

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum