none
DAX: Import unique date across tables

    Question

  • Hi all,

    I have two tables: 'Master' and 'Task.'

    'Master'

    ID Task 2 Completed
    John
    Mark

    'Task'

    ID Task Completed
    John 1 1/23/2013
    Mark 1 5/2/2012
    Mark 2 2/21/2011
    Mark 3 3/11/2012
    John 2 9/1/2009
    John 3 8/24/2009
    Mark 4 2/8/2011

    I'm trying to get the date of Task 2 from the 'Task' table, into a calculated column ('Master'[Task 2 Completed]).  It should look like this:

    ID Task 2 Completed
    John 9/1/2009
    Mark 2/21/2011

    Suggestions...?? I've tried like 20 formulas using CALCULATE but am getting errors.  Ugh!!

    Thanks,

    ~UG

    Thursday, February 27, 2014 4:59 PM

Answers

  • Hi UG,

    Give the following formula a try...

    =CALCULATE(MAX(Task[Completed]), Task[Task] = 2)

    Note: My dates are in DD/MM/YYYY format


    Regards,

    Michael

    Please remember to mark a post that answers your question as an answer...If a post doesn't answer your question but you've found it helpful, please remember to vote it as helpful :)

    • Proposed as answer by Visakh16MVP Thursday, February 27, 2014 7:19 PM
    • Marked as answer by undergrads1 Friday, February 28, 2014 1:36 AM
    Thursday, February 27, 2014 7:09 PM

All replies

  • Hi UG,

    Give the following formula a try...

    =CALCULATE(MAX(Task[Completed]), Task[Task] = 2)

    Note: My dates are in DD/MM/YYYY format


    Regards,

    Michael

    Please remember to mark a post that answers your question as an answer...If a post doesn't answer your question but you've found it helpful, please remember to vote it as helpful :)

    • Proposed as answer by Visakh16MVP Thursday, February 27, 2014 7:19 PM
    • Marked as answer by undergrads1 Friday, February 28, 2014 1:36 AM
    Thursday, February 27, 2014 7:09 PM
  • Got it!!  I had my parentheses in the wrong place.  Ooops...

    Thanks!!

    ~UG

    Friday, February 28, 2014 1:38 AM