Forum Discussion

JIGAR's avatar
JIGAR
Icon for Resolver IV rankResolver IV
5 years ago
Solved

Find counts based on the very first transaction (MIN Transaction Date)

Hello Experts, I am trying to implement a logic to calculate the distinct count of members on each state based on their first transaction within a selected date range. I have provided the sample da...
  • Anonymous's avatar
    Anonymous
    5 years ago

    JIGAR 

     

    Measure 1 = CALCULATE(COUNT('Table'[State]),FILTER('Table',[Transaction Date]=CALCULATE(MIN([Transaction Date]),ALLEXCEPT('Table','Table'[Member Key]))))

     

    Measure 2 = CALCULATE(COUNT('Table'[State]),FILTER('Table',[Transaction Date]=CALCULATE(MAX([Transaction Date]),ALLEXCEPT('Table','Table'[Member Key]))))

     

    Please check the pbix for detail, measure 1 is on page 1, measure 2 is on page 2.

     


    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.