Forum Discussion

tjeffries's avatar
tjeffries
Icon for Helper I rankHelper I
6 years ago

create a new table from an existing table

All 

 

Extremely new to power bi.  I am looking to create a new table from an existing table.  But I want to exclude any lines with the values  "in Production", "Shipped" and "Delivered" in the order status column.   I have tried to use summarize but it is not working for me.  Any help would be appreciated.

 

OrderCustomerOrder Status
1Fred's autobodyIn Production
2Fred's autobodyBack-ordered
3Fred's autobodyPacking
4Fred's autobodyNew
5Fred's autobodyBack-ordered
6Fred's autobodyNew
7Fred's autobodyShipped
8Fred's autobodyDelivered
9Fred's autobodyIn Production
10Fred's autobodyShort Material

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi tjeffries,

     

    You can do this using the Summarize, the code below should work;

    New Table = FILTER(
                    SUMMARIZE('Table','Table'[Order],
                    "customer", MAX('Table'[Customer]),
                    "Order Status", MAX('Table'[Order Status])
                    )
    , [Order Status] <> "In Production" && [Order Status] <> "Shipped" && [Order Status] <> "Delivered")

     

    I would question as to weather you need to use this? could you not dupicate the table and add  visual level filters? or even duplicate it Query and apply the filters at query level? 

     

    If you need some advice let me know 

     

    Dobby

  • tjeffries 


    filter(Table, not(table[Order Status] in {"In Production","Shipped","Delivered"}))

    Or

    calculatetable(Table,filter(Table, not(table[Order Status] in {"In Production","Shipped","Delivered"})))