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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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