Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello BI community,
Trying to learn Power BI the hard way but I can't figure it out by myself. Is there a better way to filter rows from a table based on multiple string values? A bit as we would do in SQL with NOT IN ('aaa', 'bbb', 'ccc')? The red lines below are the ones I would like to optimize.
____________________________
let
Source = Sql.Databases("MYSERVER"),
CM_PKD = Source{[Name = "CM_ABC"]}[Data],
dbo_v_GS_CCM_RECENTLY_USED_APPS = CM_ABC
{[Schema = "dbo", Item = "v_GS_CCM_RECENTLY_USED_APPS"]}
[Data],
#"Removed Columns" = Table.RemoveColumns(
dbo_v_GS_CCM_RECENTLY_USED_APPS,
{
"msiVersion0",
"ProductCode0",
"ProductLanguage0",
"SoftwarePropertiesHash0"
}
),
#"Removed Other Columns" = Table.SelectColumns(
#"Removed Columns",
{"ResourceID", "ExplorerFileName0", "LastUsedTime0", "ProductName0", "ProductVersion0"}
),
#"Filtered Rows" = Table.SelectRows(
#"Removed Other Columns",
each not Text.Contains([ExplorerFileName0], "bomgar-scc-")
and not Text.Contains([ExplorerFileName0], "DisplayLinkTrayApp.exe")
and not Text.Contains([ExplorerFileName0], "FileCoAuth.exe")
and not Text.Contains([ExplorerFileName0], "FileSyncConfig.exe")
and not Text.Contains([ExplorerFileName0], "identity_helper.exe")
and not Text.Contains([ExplorerFileName0], "ie4uinit.exe") //my list has 40 more items...
)
in
#"Filtered Rows"
____________________
Thank you in advance,
MDuf
Hi,
Share data in a format that can be pasted in an MS Excel file and show the expected result.
Nothing wrong with that code. If you want to "optimize" it then fold it up into the SQL. (That may be happening anyway)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
70 | |
37 | |
29 | |
26 |
User | Count |
---|---|
91 | |
49 | |
44 | |
38 | |
37 |