Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all
Is there any way for me to count the number of valid attachments within an email in Query Editor? To do that, I need to ignore the header logo, footer logo, other random bits of garbage that show up as attachments on the email. So I need to count the number of attachments where the 'ContentType' field starts with 'Application'
I have aggregated the Attachments column by count of Attachment Name, but I want to add in a condition where the COUNT will only include attachments where the 'ContentType' of the attachment begins with 'Application' - how can I do this please?
My query is currently like this:
let
Source = Exchange.Contents("XXX@XXX.co.uk"),
Mail1 = Source{[Name="Mail"]}[Data],
#"Filtered Rows" = Table.SelectRows(Mail1, each ([Folder Path] = "\Inbox\Purchase Ledger\Invoices\In Query\" or [Folder Path] = "\Inbox\Purchase Ledger\Invoices\New\" or [Folder Path] = "\Inbox\Purchase Ledger\Statements\New\")),
#"Aggregated Attachments" = Table.AggregateTableColumn(#"Filtered Rows", "Attachments", {{"Name", List.NonNullCount, "Count (Not Blank) of Attachments.Name"}})
in
#"Aggregated Attachments"
Many thanks for all help
Found a different way to do this
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |