Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Create new table from another and condition

Hi all,

I'm looking to achieve the following:

Table1

idNamestatusRole
1AlphaActiveSupplier
2BetaNon-activecustomer
3ZoulouActiveSupplier

 

New Table ( id, name where status = Active and Role Supplier)

idName
1Alpha
3Zoulou

 

Thx in advance for your help.

Guy 

 

  • Perhaps:

     

    New Table =
      SELECTCOLUMNS(
        FILTER(
          'Table1',
          'Table1'[status] = "Active" &&
            'Table1'[Role] = "Supplier"
        ),
        "id",[id],
        "Name",[Name]
      )

     

     

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Perhaps:

     

    New Table =
      SELECTCOLUMNS(
        FILTER(
          'Table1',
          'Table1'[status] = "Active" &&
            'Table1'[Role] = "Supplier"
        ),
        "id",[id],
        "Name",[Name]
      )

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Many thanks Greg!