Forum Discussion

ratercero's avatar
ratercero
Helper III
9 years ago
Solved

Conditional duplicate secuence count 2 columns

Hello, I need to count de sequence a batch number and a description repeats except if description = "OK", here es my current table:       Here is what I'm looking for:          ...
  • Phil_Seamark's avatar
    Phil_Seamark
    9 years ago

    Hi ratercero,

     

    I have the March Update and have built a very simple version which I have uploaded here.  Please download and see if it works for you.

     

    PBIX file to test

  • Phil_Seamark's avatar
    Phil_Seamark
    9 years ago

    Hi ratercero,

     

    Please try this slightly modified column.

     

    Sequence Count = COUNTROWS(
                FILTER(
                    'Table',
                    'Table'[BATCH_NUMBER_1]=EARLIER('Table'[BATCH_NUMBER_1]) 
                    && 'Table'[DESCRIPTION]<>"ok" 
                    && 'Table'[DESCRIPTION] = EARLIER('Table'[DESCRIPTION])
                    && 'Table'[c_FinishedDT] <= EARLIER('Table'[c_FinishedDT]
                )
               ))