Forum Discussion

gvb238's avatar
gvb238
Frequent Visitor
8 years ago
Solved

Comparison with the previous month using Power Bi

Hi   I have 3 fields Period, Bucket, Ecmployee code. Scenario: here 2 months period, it is compare with previous Month. Aug-Red (102) Sep-Amber  (102)  based on Employee code  equal to then disp...
  • petrovnikitamai's avatar
    8 years ago

    1.add column "netxMonth" in table 

    nextMonth = DATEADD('table'[Period];1;MONTH)

    2. lookupvalue and concat

    bucketNexMonth = IF(ISBLANK('table'[nextMonth]);BLANK();'table'[Bucket]&" to "&LOOKUPVALUE('table'[Bucket];'table'[Employee Code];'table'[Employee Code];'table'[Period];'table'[nextMonth]))

    try this