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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
RichBurdick
Helper I
Helper I

Help With Measure for Date

I have data  from two tables that I am trying to use to get one date.  One table is an audt trail table that holds the date(s) a record was closed (or re-closed).  I have filtered only the activities I want to use in Power Query.

 

The audit trail table has the following:

  • ID field
  • Activity Name field
  • Date Performed field
  • Source State field
  • Destination State field

The other table is my CAPA table and has the following:

  • ID field
  • Short Description field
  • Overall Target Due Date field
  • Overall Completion Date field
  • Status

Here is what I am trying to do via DAX,  I want to create a clousre date where we use the earliest date from the Date Performed field from the audit trail table when that date is > Overall Completion Date field.

 

Any ideas how to do this?

 

1 ACCEPTED SOLUTION
rfigtree
Resolver III
Resolver III

assuming tables linked on id field and the capa table is a Dimention.

 

mClosure:=
CALCULATE(MIN(tblFact[dateperformed]),
          FILTER(tblFact,tblFact[dateperformed]>RELATED(tblDIM[overallcompletiondate]))
          )

 

rfigtree_0-1614755506561.png

 

View solution in original post

1 REPLY 1
rfigtree
Resolver III
Resolver III

assuming tables linked on id field and the capa table is a Dimention.

 

mClosure:=
CALCULATE(MIN(tblFact[dateperformed]),
          FILTER(tblFact,tblFact[dateperformed]>RELATED(tblDIM[overallcompletiondate]))
          )

 

rfigtree_0-1614755506561.png

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors