Forum Discussion

gco's avatar
gco
Resolver II
6 years ago
Solved

Data manipulation

Hi there,    I am trying to make a measure in PowerBI from the following data.   Code ProcessDate TransDate Value NewValue 1 20190630 20190629 10 25 1 20190701 20190701 25 25...
  • Nathaniel_C's avatar
    6 years ago

    Hi gco ,

    Measure NewValue = 
    var _pDate = MAX(NVAL[ProcessDate])
    var _tDate = MAX(NVAL[TransDate])
    
    var _tValue = Calculate(MAX(NVAL[Value]), ALLEXCEPT(NVAL,NVAL[ProcessDate],NVAL[Code]),NVAL[ProcessDate]=_pDate+1)
    
    return
    IF (_pDate <> _tDate,_tValue, MAX(NVAL[Value]))


    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
    Nathaniel