Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Custom Measure: Is date between or later than two dates

Hi,   I need to create a custom measure that will find the distinct count of [Member ID] if [Term Date] is between the min and max of [The Date]...or if [Term Date] is later than the max of [The Da...
  • v-zhangti's avatar
    v-zhangti
    4 years ago

    Hi, Anonymous 

     

    You can try the following methods.

    Measure =
    CALCULATE (
        DISTINCTCOUNT ( 'DM_IHA_Member'[Member ID] ),
        FILTER (
            ALL ( 'DM_IHA_Member' ),
            OR (
                [TermDate] >= MIN ( 'Date'[Date] )
                    && [TermDate] <= MAX ( 'Date'[Date] ),
                [TermDate] >= MAX ( 'Date'[Date] )
            )
        )
    )
    

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

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