Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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: one for the regular databases and one for the log files.
I thought I was creating the first one using the below. However, I realize that just returned all the same data, it did not filter out the file names that have _log. 😞
Logically, I figured if I removed the word "NOT" it would then create a table for those that contained "_log". I was wrong! I don't get an error but the table is empty. I haven't been in the DAX world for a while and my brain is totally overthinking this. Help! 🙂
Solved! Go to Solution.
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":
Proud to be a Super User!
@DataInsights I knew it had to be something simple that I was missing!! Thank you!!!
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":
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |