Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
matteobetti
New Member

DAX Max value from a Column

Hi, 
As an example, I havea data table like this

Cus1Marco2020/09/1812345
Cus1Mario2020/07/0156789
Cus 2Giovanni2020/09/0111111
Cus 2Andrea2020/05/0134556
Cus 1Mario2019/01/0109876
Cus 3Luca2020/06/0156789

And I need to create a Table that contains only the last created ticket num per Customer

CustomerReporterTicket Num
Cus 1Marco12345
Cus 2Giovanni11111
Cus 3Luca56789

 

I've created a measure 

 

 

LATEST_ISSUE_NUM = MAX(CUS_INC_DATA[CREATED].[Date])

 

 

But when I try to create a Matrix I can't put the measur on Rows. 
Any Idea on how to get the table I need? 
Thanks a lot

1 ACCEPTED SOLUTION

@matteobetti 
You can create a Calculated Table:

 

Table 2 = CALCULATETABLE('Table',FILTER('Table',[Created Date]=CALCULATE(MAX('Table'[Created Date]),ALLEXCEPT('Table','Table'[Customer]))))

 

maxdate table.JPG

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@matteobetti ,

Use this one on a visual table with customer

Last reporter = CALCULATE(lastnonblankvalue(CUS_INC_DATA[CREATED], max(CUS_INC_DATA[Reporter])) ,ALLEXCEPT(CUS_INC_DATA,CUS_INC_DATA[Customer]))

 

 

LATEST_ISSUE_NUM = lastnonblankvalue(CUS_INC_DATA[CREATED], max(CUS_INC_DATA[Ticket Num]))

or

LATEST_ISSUE_NUM = CALCULATE(lastnonblankvalue(CUS_INC_DATA[CREATED], max(CUS_INC_DATA[Ticket Num])) ,ALLEXCEPT(CUS_INC_DATA,CUS_INC_DATA[Customer]))

 

Hi @amitchandak , 
thanks for answer. 
I've tried but It does not work for me. 
I Have

CustomerReporterIssue Num
Cus 1xxxx
Cus 1xxxx
Cus 2xxxx

I Can't visualize the latest created  by customer

@matteobetti 
You can create a Calculated Table:

 

Table 2 = CALCULATETABLE('Table',FILTER('Table',[Created Date]=CALCULATE(MAX('Table'[Created Date]),ALLEXCEPT('Table','Table'[Customer]))))

 

maxdate table.JPG

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.