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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
antlufc
Frequent Visitor

Value Based on Max Date from Another Column

Hi, 

I am looking to find a DAX measure/measures that will let me find the value of a sales lead based upon the max date time only if there is more than one entry in the same month. I do not want to find the value of the max date time associated with each lead as i am trending them based upon date as to when closed dates have been moved forward or backwards. I have attached a sample excel file with data and column names as per my PBI report.  I have highlighted in yellow those that i would expect to see as the single value. https://1drv.ms/f/s!AivZWzcfJJzngTyP6aMWz0rJKWXU 

antlufc_0-1682494538748.png

 

1 REPLY 1
tamerj1
Super User
Super User

Hi @antlufc 
Please refer to attached sample file with the proposed solution

3.png

Measure = 
SUMX ( 
    SUMMARIZE ( 'Table', 'Table'[pipeline_journey_id], 'Table'[event_date] ),
    MAXX ( 
        INTERSECT ( 
            'Table',
            TOPN ( 
                1,
                CALCULATETABLE ( 
                    'Table', 
                    ALLEXCEPT ( 'Table', 'Table'[pipeline_journey_id],'Table'[event_date] ) 
                ),
                'Table'[event_datetime]
            )
        ),
        'Table'[amount_average_contract_value]
    )
)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.