Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Rows Measure

Good afternoon everyone,   I'm trying to create a measure that brings in all the rows in a column based on a filter.  If this was a column, and I'd like to keep only the LeadId where the created d...
  • v-kelly-msft's avatar
    v-kelly-msft
    5 years ago

    Hi  Anonymous ,

     

    You could use DATEADD function to realize it:

    First create a dim calendar table;

    Then create a measure as below:

    Measure = IF(NOT(ISFILTERED('calendar table'[Month])),MAX('Table'[date]),CALCULATE(MAX('Table'[date]),DATEADD('calendar table'[Date],-1,MONTH)))

     And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!