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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

how to calculate monday to sunday values

Hi 

How to calculate sum of  this week monday to sunday values and following week monday to sunday values.

example

this monday to friday 23/03/2010 - 29/03/2020

following monday 30/03/2020 - 05/04/2020

 

Thanks in anticipation

Kavitha ghosh

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

In fact, you can use year and weeknum function as conditions to compare with date field to lock on a specific week range.
After these steps, you only need to write a common rolling calculation formula with the above conditions to achieve your requirement about weekly rolling total:

Measure =
VAR currDate =
    MAX ( Table[Date] )
RETURN
    CALCULATE (
        SUM ( Table[Amount] ),
        FILTER (
            ALLSELECTED ( Table ),
            WEEKNUM ( [Date], 2 ) = WEEKNUM ( currDate, 2 )
                && YEAR ( [Date] ) = YEAR ( currDate )
                && [Date] <= currDate
        )
    )

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

In fact, you can use year and weeknum function as conditions to compare with date field to lock on a specific week range.
After these steps, you only need to write a common rolling calculation formula with the above conditions to achieve your requirement about weekly rolling total:

Measure =
VAR currDate =
    MAX ( Table[Date] )
RETURN
    CALCULATE (
        SUM ( Table[Amount] ),
        FILTER (
            ALLSELECTED ( Table ),
            WEEKNUM ( [Date], 2 ) = WEEKNUM ( currDate, 2 )
                && YEAR ( [Date] ) = YEAR ( currDate )
                && [Date] <= currDate
        )
    )

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Anonymous  , You can create a date calendar and week start and week end based on that. You can create a week name based on that. Refer, how to so in the calendar and how to use it

 

https://www.dropbox.com/s/a9xq913pgvuzg2x/sales_analytics_weekWiseMon_sun.pbix?dl=0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.