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
Spotto
Helper IV
Helper IV

Minimum with three related tables

hi guys, 

I have 3 related columns and I need to bring the minimum date from the PENDING DATE column in table PENDING

 

RESULT (example):

Spotto_1-1701973744599.png

 

table CONTRACT:

PDDMCT

LINHA

ID_CONTRACT

 

table PAYMENT

ID_CONTRACT

ID_PAYMENT

Payment_Date

 

table PENDING

ID_PAYMENT

PENDING_DATE

 

Is it possible to create a measure that brings the minimum PENDING_DATE by PDDMCT?

 

TKS for help 🙂

3 REPLIES 3
smpa01
Super User
Super User

@Spotto  can you try this

Measure = CALCULATE (
    MIN ( PENDING[PENDING_DATE] ),
    FILTER (
        ALL ( PENDING ),
        PENDING[ID_PAYMENT]
            = CALCULATE (
                MIN ( PENDING[ID_PAYMENT] ),
                ALL ( PAYMENT ),
                VALUES ( PAYMENT[ID_CONTRACT] )
            )
    )
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
PijushRoy
Super User
Super User

Calculate(
MIN(
'PENDING'[Pending_Date]),
FILTER(
FILTER(
Related( first condition as per data model)),
Related( second condition as per data model))
)

 

Please try this, change the DAX as per your data model.
If you solve, post sample data and image for your data model

If solve your requirement, please ACCEPT AS SOLUTION

 @PijushRoy Thanks for your help, but it didn't work 😞, could you give more details?

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.