Forum Discussion

ss8551's avatar
ss8551
Icon for Helper II rankHelper II
3 years ago
Solved

Power BI Direct Query DateDiff

Hoping someone can assist me.  I have a PowerBI that I have linked with another PowerBI as a Direct Query.  I'm looking to find a way to do a DateDiff Formula to determine if a rep has been trained. ...
  • v-easonf-msft's avatar
    3 years ago

    Hi, ss8551 

    Not fully sure what you want.

    Please check if formula below could help:

    Result = 
    VAR max_date =
        CALCULATE ( MAX ( 'Direct Query'[comp_train] ), ALL ( 'Direct Query' ) )
    RETURN
        IF ( MAX ( 'Desktop PBI'[Date] ) > max_date, "Trained", "Not_Traind" )

    Best Regards,
    Community Support Team _ Eason