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
PoonamJaswani
Regular Visitor

Trying to calculate maximum date across 2 fixed field names! Kindly Help

I made certain calculations in Tableau which I am trying to replicate in DAX, can anyone please help me do so.

 

The sample data snapshot is attached below, e.g for each Id there are multiple dates for a new request so, we just want to pick the last date or max date.

The fourth column is expected output for first calculation.

In the Second calculation, 'Assigned to Vendor Reece ' is one of the dell names in the table 

 

1.Max_Modified_Date

  DATE({ FIXED [dell RequestId Name],[Dell Name]:MAX([Modified On])})

 

2. Assigned to Vendor for Reece

{Fixed [dell RequestId Name]: MAX( IF [Dell Name]= "Assigned to Vendor for Recce" THEN [Modified Date_max]
END)

Capture.JPG

 

3 REPLIES 3
Hardik
Continued Contributor
Continued Contributor

Try This :

 

Modified Date_max] = Max_(CALCULATE(MAX([[Modified On]),FILTER(tablename,[dell RequestId Name]=EARLIER('[dell RequestId Name])),FILTER(tablename,[[Dell Name]]=EARLIER([Dell Name]))

 

This work sames as the calculation you created for tableau. 

Greg_Deckler
Super User
Super User

Not exactly certain what you are going for here but if you are looking for the MAX between multiple columns, then you can use my Quick Measure here:  https://community.powerbi.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-...

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi Greg, 

 

This is very different from what I want to calculate! 

 

For each Request Id, there are a certain set of steps followed, which are mentioned in the column of Dell name.

And, each step has its modified date, therefore, in this data one Request Id, for each step can have multiple entries from which I need to pick the last modified date of each step in each ID.

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.