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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
finzilla
Frequent Visitor

Same Period Last Week

Hello... I'll simplify this by having only five columns within the SalesTransaction table:

 

TransDate (eg. 05/29/2018)

TransTimePeriod (eg. 06:30-07:00)

SaleAmount (eg. 200.00)

ThisWeek ( measure where = 1 when True)

LastWeek (measure where= 1 when True)

 

I also have a Date table.

 

I want to create a visual that shows the following:

 

hourly.png

 

Essentially I need to summarize the SaleAmount for each TransTimePeriod (easy so far), and then compare it for the same period last week (which is where I'm getting stuck).

 

 

 

 

 

4 REPLIES 4
nfero68
Regular Visitor

Working solution! THX! 

 

ChandeepChhabra
Impactful Individual
Impactful Individual

@finzilla Please share your sales transaction table

Here is a simplified example of the SalesTransaction table (it's a whole lot more sophisticated but this will do):

 

data.png

 

Date file is just a list of dates.

Hi @finzilla,

 

Please check the demo in the attachment. 

1. I would suggest adding a column in the date table.

WeekNum = WEEKNUM([Date],2)

2. Create three measures.

 

Today =
CALCULATE ( SUM ( Table1[SaleAmount] ), 'Calendar'[Date] = TODAY () )
LastWeek =
CALCULATE (
    SUM ( Table1[SaleAmount] ),
    'Calendar'[WeekNum]
        = WEEKNUM ( TODAY (), 2 ) - 1
)
Variance = [Today] - [LastWeek]

Same Period Last Week.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 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.