Search code examples
powerbidaxdata-analysispowerbi-desktopmeasure

Get Earlies & Latest Date per customer - DAX


I have two tables connected together by date. I want to create a calculation which will calculate the earlies and the latest date per customer.

enter image description here

First Contact Column = CALCULATE ( MIN(DimDate[Date]), ALLEXCEPT(FctTrc, FctTrc[Customer]) )

I have create a calculation but it giving me the earliest date of the date table.

Any help?


Solution

  • First Contact Column = CALCULATE(  MIN(FctTrc[Date]), REMOVEFILTERS(), VALUES(FctTrc[Customer]))
    

    should be all you need.