Forum Discussion
Updating data source by replacing Outlook attachment
- 6 years ago
Hi,
In your dataset, I am assuming that there is a column which represents "Date of Attachment" or Date of Mail". In the Query Editor, write this "M" language formula to get today's date in a column
=DateTime.Date(DateTime.LocalNow())
In "M" itself, write this formula to check for whether the Date of Attachment is the same as Today's date
=[Date of Attachment]=[Today]
Today is the name of column with Today's date. Filter this new column on TRUE.
Hope this helps.
Hi,
In your dataset, I am assuming that there is a column which represents "Date of Attachment" or Date of Mail". In the Query Editor, write this "M" language formula to get today's date in a column
=DateTime.Date(DateTime.LocalNow())
In "M" itself, write this formula to check for whether the Date of Attachment is the same as Today's date
=[Date of Attachment]=[Today]
Today is the name of column with Today's date. Filter this new column on TRUE.
Hope this helps.
- Marco30076 years agoFrequent Visitor
Hi, Ashish! Thanks for replying!
What I did: I connected to Exchange Online, then filtered to only pull data from a specific folder in my inbox, and then I removed all the columns that are not the "Attachments". At the Fx field I can see this:
= Table.SelectColumns(#"Filtered Rows",{"Attachments"})And below is what I have:
Each one corresponds to an Excel spreadsheet, and I can hit the Expand arrows to get the data itself, but it will merge all the files and I only need the latest data.
Sorry for being so newbie, but where can I move from here? :smileylol:
Thank you!
- Ashish_Mathur6 years agoSuper User
Hi,
As mentioned in my previous message, there has to be a Date of Attachment or Date of Mail column there.
- Marco30076 years agoFrequent Visitor
After banging my head a little, I found what I was looking for – which is to keep only the latest e-mail: I just had to use the option "Keep Rows" and select 1, so out of the incoming e-mails flow, Power BI will only stick to the last one received.
But thank you very much for your time, Ashish!