Forum Discussion

SandeA's avatar
SandeA
Helper III
4 years ago
Solved

Creating tables

I have a table that has columns of Date, FileName, DatabaseName, and Size. Some of the FileName fields have a "_log" at the end of the name. I'm trying to split this table into two separate tables: o...
  • DataInsights's avatar
    4 years ago

    SandeA,

     

    You're missing the second parameter of the RIGHT function that specifies the number of characters.

     

    DatabaseInfo =
    SELECTCOLUMNS (
        FILTER ( Servers, NOT ( RIGHT ( Servers[Filename], 4 ) = "_log" ) ),
        "Date", Servers[Date],
        "File Name", Servers[FileName],
        "Database", Servers[DatabaseName],
        "Size", Servers[Size]
    )

     

    You can also do this in Power Query. Create a query that references the main query, and filter using "does not end with":