Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Lsvzz
Frequent Visitor

Week to Week Comparison

Hi!

 

 

Im trying to create a comparison between last 2-3 weeks of sales that can be filtered per salesperson. I managed to create a table with the information of just last week, but i would like to get the table or the matrix to update automatically so i dont have to update it manually every meeting. And if possible using a color green/red to mark whenever its going up or down in sells per week vs last week.

 

My guess is that it would be something using today() - x. Im just very new and i dont know the full structure.

 

It would be something like this:

 

 week xweek yweek z
Account1$$$
Account2$$$
Account3$$$

 

 Thanks in advance!

1 ACCEPTED SOLUTION
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Lsvzz

 

In this scenario, I think you can add a flag column to tag Current Week and Last Week.

 

IsWithin2Weeks =
IF (
    YEAR ( Table[Date] ) = YEAR ( TODAY () )
        && WEEKNUM ( Table[Date], 2 ) >= WEEKNUM ( TODAY (), 2 )-1,
    1,
    0
)

Then put this column into Visual Level, make it "is 1".

 

Regards,

View solution in original post

1 REPLY 1
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Lsvzz

 

In this scenario, I think you can add a flag column to tag Current Week and Last Week.

 

IsWithin2Weeks =
IF (
    YEAR ( Table[Date] ) = YEAR ( TODAY () )
        && WEEKNUM ( Table[Date], 2 ) >= WEEKNUM ( TODAY (), 2 )-1,
    1,
    0
)

Then put this column into Visual Level, make it "is 1".

 

Regards,

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.