Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have imported an Outlook Mail box and I want to flag the first and last email in a conversation.
I have started by normalising the subject by removing FW: and RE: so I can group the emails by subject.
I'm struggeling with the DAX to identify the first and last date in each group through.
I am currently trying the following:
Solved! Go to Solution.
Just incase anyone googles this in the future and needs the answer - here you go:
Earliest = Calculate(min(Mail[DateTimeReceived]),filter(mail,Mail[subject]=earliest(Mail[Subject])))
And
Latest = Calculate(max(Mail[DateTimeReceived]),filter(mail,Mail[subject]=earliest(Mail[Subject])))
As for the error: Cannot convert value from text to Yes/No;
You have to actually filter something. FILTER(TABLE,EXPRESSION)
Table = mail <-- your table
Expression = Mail[Subject] <-- your column
You might want to filter a specific subject text, i.e. FILTER(mail,Mail[Subject]="Subjectname")
The better question here might be then - How do you replicate a SQL GroupBY clause in DAX
I am now trying the following moving away from the Filter
Just incase anyone googles this in the future and needs the answer - here you go:
Earliest = Calculate(min(Mail[DateTimeReceived]),filter(mail,Mail[subject]=earliest(Mail[Subject])))
And
Latest = Calculate(max(Mail[DateTimeReceived]),filter(mail,Mail[subject]=earliest(Mail[Subject])))
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |