Forum Discussion

TheHans's avatar
TheHans
Icon for Helper I rankHelper I
5 years ago
Solved

Determine progress change for same items with different date

Dear all, I am pretty new to PowerBi and so far I could solve my problems with simple research. Now I come to a point where I could not find any solution for my question.   I have following table ...
  • v-kelly-msft's avatar
    v-kelly-msft
    5 years ago

    Hi  TheHans ,

     

    You can also use below dax expressions:

    Progress previous date = 
    var _date=CALCULATE(MAX('Table'[Date]),FILTER('Table','Table'[ID]=EARLIER('Table'[ID])&&'Table'[Date]<EARLIER('Table'[Date])))
    Return
    IF(_date=BLANK(),0,CALCULATE(MAX('Table'[Progress]),FILTER('Table','Table'[Date]=_date&&'Table'[ID]=EARLIER('Table'[ID]))))
    difference = IF('Table'[Progress previous date]=0,0, 'Table'[Progress]-'Table'[Progress previous date])

     And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!