March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have a matrix table that contains two columns.
A reference no. is the same for all mails in each mail thread, and the mail numbers change every time somebody replay or forwards the mail.
The view that I,m trying to create is this one:
So the Reference no. and the last email in the thread will be in one row, plus the count of all emails related to this reference number.
I've added Email numbers under the Values for Matrix table and selected the LAST, but it doesn't show me the last email number.
What do I do?
I hope you can help me to solve this issue.
"when there are many emails in the mail thread, I get another mail number but not the last one."
can you provide the reference numbers for an email which shows this please. Just enough to illustrate this please (i.e. not 500 references!)
@Maryam_Pour
Use two measures.
LAST EMAIL NO = MAX ( TABLENAME[EAMIL NUMBER] )
COUNT OF EMAILS = COUNTA( TABLENAME[EAMIL NUMBER] )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
I have a big table with many reference numbers and many emails related to each of these reference numbers.
I'm not seeing how I can get the last email for each reference number in your solution.
"it doesn't show me the last email number" - what does it show?
In some cases, when there are a few emails in the mail thread, I get the last email and reference number in one row. But when there are many emails in the mail thread, I get another mail number but not the last one.
Hi @Maryam_Pour ,
Maybe you do some filters to this page where the matrix table is by slicer or filter pane.You can use ALLEXCPET() to to remove other filter context on this measure. Some code like the following.
Last =
CALCULATE(
LASTNONBLANK( 'Table'[Email Number], 0 ),
ALLEXCEPT( 'Table', 'Table'[Reference Number] )
)
If this does not work well, creating a index column maybe another choice.Please refer code below.
Last_index =
VAR _index =
CALCULATE(
MAX( 'Table'[Index] ),
ALL( 'Table' ),
'Table'[Reference Number] = SELECTEDVALUE( 'Table'[Reference Number] )
)
RETURN
CALCULATE( MAX( 'Table'[Email Number] ), 'Table'[Index] = _index )
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
86 | |
73 | |
57 | |
52 |
User | Count |
---|---|
197 | |
133 | |
107 | |
69 | |
65 |