Forum Discussion

dosinkevic's avatar
dosinkevic
Frequent Visitor
8 years ago
Solved

IF statement or different solution?

How can I use IF statement in this case or it should be different solution?   I neet to run this formula only if Campaign {"date"} = CRM {"date"} then Column =.... Column = VAR __tmpTable = ADDCO...
  • v-jiascu-msft's avatar
    8 years ago

    Hi dosinkevic,

     

    Maybe you can try this formula.

    Column =
    VAR __tmpTable =
        ADDCOLUMNS ( ALL ( crm ), "Found", FIND ( [id], [camp_tracker],, -1 ) )
    VAR campaign_date = [date]
    RETURN
        COUNTROWS ( FILTER ( __tmpTable, [Found] <> -1 && [date] = campaign_date ) )
    

    Best Regards,

    Dale