Forum Discussion

VP1310's avatar
VP1310
Frequent Visitor
3 years ago
Solved

Flag rows based on conditions

Hi Everyone, I have a set of data as shown below, Customer Invoicedate Event A 1/8/2023 Trial A 4/8/2023 Purchase B 1/8/2023 Purchase B 3/8/2023 Exchange B 4/8/2023 De...
  • Ahmedx's avatar
    3 years ago

    pls try this

     

     

    Flag = 
    VAR _t1 = [Customer]
    VAR _MinDate = MINX(FILTER(ALL('Table'),'Table'[Customer]=_t1),[Invoicedate])
    VAR _tbl = FILTER(ALL('Table'),'Table'[Customer]=_t1&&'Table'[Event]="Trial"&&[Invoicedate]=_MinDate)
    RETURN
    COUNTROWS(_tbl)

     

     

    If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.