Forum Discussion

vat2do's avatar
vat2do
Helper III
2 years ago

create new column from duplicate values with condition

Hi everyone,

I have below table in powerbi desktop

 

Ticket numberbreachedstatusUnique Ticket Numbers
1234trueclosed 
1234falseclosed 
1020falseclosed 
1020falseclosed 
1452trueclosed 
1452falseclosed 

 

I want to create new column "unique ticket numbers" having all the unique values from first column where "breached" column value=false

 

Kindly share if there is a solution.

Thanks

 

3 Replies

  • vat2do 

    is this what you want?

    Column = 
    VAR _check=maxx(FILTER('Table','Table'[Ticket number]=EARLIER('Table'[Ticket number])&&'Table'[breached]=True()),'Table'[Ticket number])
    return if (ISBLANK(_check),'Table'[Ticket number],BLANK())

    • vat2do's avatar
      vat2do
      Helper III

      Thanks for your response but i need the output as mentiined below:

       

      1234

      1020

      1452

      Means shoukd have all the unique values with "false" status.

      •  

       

      •  

       

      • ryan_mayu's avatar
        ryan_mayu
        Super User

        still don't understand. could you pls create the output in excel and paste the screenshot here?