Forum Discussion

qwaiti27231's avatar
qwaiti27231
Icon for Helper III rankHelper III
5 years ago
Solved

Need help urgently match

Date(m/d/year)      Order id 1/5/2020                    1 1/6/2020                    2 1/7/2020                     3 2/6/2020                  1               2/6/2020                   2    ...
  • AlB's avatar
    5 years ago

    qwaiti27231 

    The measure I suggested above should work. If you want a calculated column:

    Flag = 
    VAR currentOrder_ =  Table1[Order id]
    VAR limit_ = EOMONTH (  Table1[Date(m/d/year) ] , -1 )
    RETURN
        CALCULATE (
            COUNT ( Table1[Order id] ),
            Table1[Order id] = currentOrder_,
            Table1[Date(m/d/year) ] <= limit_,
            ALL ( Table1 )
        ) + 0

    Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers