Forum Discussion

zaza's avatar
zaza
Resolver III
5 years ago
Solved

Optimizing ALLEXCEPT - Getting the next date per categories

I wrote this calculated column and it works perfectly, but the problem is that it takes way too much time to load. Question is, how can I optimize this?

NextOutboundCall = 
    VAR __call = Calls[Date]

    RETURN
        CALCULATE ( 
            MIN ( Calls[Date] ), 
            FILTER ( 
                ALLEXCEPT ( Calls, Calls[Customer] ), 
                Calls[Date] > __call && 
                Calls[Type] = "OUTBOUND" 
            ) 
        )

My data looks like this (I'm replacing results with blank where there are blanks):

 

  • zaza , Try a new column like

    minx(filter(Calls, [Customer] =earlier([Customer]) && [Date] > earlier([Date]) && [Type] = "OUTBOUND"),[Date])

1 Reply

  • zaza , Try a new column like

    minx(filter(Calls, [Customer] =earlier([Customer]) && [Date] > earlier([Date]) && [Type] = "OUTBOUND"),[Date])