Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Highlight Changes Week Over Week

Hello.

I'm developing a project that involves taking an existing Excel spreadsheet that is manually generated using a database and converting it into Power BI.  For the first iteration, I'd like to stay as true to the original as possible.  To accomplish this, I need to be able to highlight each difference from one week to the next.  

My data comes from a database as a consistant time each week.  The source file is used to assign a week number, and the data is then appended to all of the older data.  I have dax formulas that identify 'this week' and 'last week'.

Where do I go from here?

(in the example below, I indicated what I would like highlighted with ().)

 

What my table looks like  
Week NumberScopeCompleteAcceptedManager
102222/22/20213/15/2021Mary
102253/8/20213/29/2021Mary
102286/12/20217/3/2021

Walter

 

What I want    
Week NumberScopeCompleteAcceptedManager
102222/22/20213/15/2021Mary
102253/8/20213/29/2021(Mary)
10228(6/12/2021)(7/3/2021)Walter

 

My data      
Week NumberActivityScopeDescriptionStartFinishStepManager
81.1222Get money12/24/20201/1/2021 Mary
81.2222Build 2/7/20212/15/2021 Mary
81.3222Complete2/14/20212/22/2021CCMary
81.4222Accept3/7/20213/15/2021OAMary
82.1225Get money12/12/202012/20/2020 Dan
82.2225Build 1/25/20212/2/2021 Dan
82.3225Complete2/28/20213/8/2021CCDan
82.4225Accept3/21/20213/29/2021OADan
83.1228Get money2/22/20213/2/2021 Walter
83.2228Build 4/1/20214/9/2021 Walter
83.3228Complete4/28/20215/6/2021CCWalter
83.4228Accept5/7/20215/15/2021OAWalter
91.1222Get money12/24/20201/1/2021 Mary
91.2222Build 2/7/20212/15/2021 Mary
91.3222Complete2/14/20212/22/2021CCMary
91.4222Accept3/7/20213/15/2021OAMary
92.1225Get money12/12/202012/20/2020 Dan
92.2225Build 1/25/20212/2/2021 Dan
92.3225Complete2/28/20213/8/2021CCDan
92.4225Accept3/21/20213/29/2021OADan
93.1228Get money2/22/20213/2/2021 Walter
93.2228Build 4/1/20214/9/2021 Walter
93.3228Complete4/28/20215/6/2021CCWalter
93.4228Accept5/7/20215/15/2021OAWalter
101.1222Get money12/24/20201/1/2021 Mary
101.2222Build 2/7/20212/15/2021 Mary
101.3222Complete2/14/20212/22/2021CCMary
101.4222Accept3/7/20213/15/2021OAMary
102.1225Get money12/12/202012/20/2020 Mary
102.2225Build 1/25/20212/2/2021 Mary
102.3225Complete2/28/20213/8/2021CCMary
102.4225Accept3/21/20213/29/2021OAMary
103.1228Get money2/22/20213/2/2021 Walter
103.2228Build 4/1/20214/9/2021 Walter
103.3228Complete6/4/20216/12/2021CCWalter
103.4228Accept6/25/20217/3/2021OAWalter

 

Thanks for your help.

  • Anonymous  There's probably a more efficient way but my brain capacity isn't coming up with it today. 

     

    You can create a measure for each column/measure value you want to compare and add conditional formatting. I have done the Manager one for you, just follow the pattern for the Complete and Accepted: 

     

    Week on Week Manager Change =
    VAR _ThisWeek = MAX('Table'[Week Number])
    VAR _Lastweek = _ThisWeek -1
    VAR _valThisWeek =[Manager Name]
    VAR _valLastWeek = CALCULATE([Manager Name], 'Table'[Week Number] = _Lastweek)
    RETURN
    IF(_valThisWeek = _valLastWeek, 0, 1)
     
    PBIX file attached below signature. 

2 Replies

  • AllisonKennedy's avatar
    AllisonKennedy
    Icon for Community Champion rankCommunity Champion

    Anonymous  There's probably a more efficient way but my brain capacity isn't coming up with it today. 

     

    You can create a measure for each column/measure value you want to compare and add conditional formatting. I have done the Manager one for you, just follow the pattern for the Complete and Accepted: 

     

    Week on Week Manager Change =
    VAR _ThisWeek = MAX('Table'[Week Number])
    VAR _Lastweek = _ThisWeek -1
    VAR _valThisWeek =[Manager Name]
    VAR _valLastWeek = CALCULATE([Manager Name], 'Table'[Week Number] = _Lastweek)
    RETURN
    IF(_valThisWeek = _valLastWeek, 0, 1)
     
    PBIX file attached below signature. 
  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks so much Allison.  This works perfectly.