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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Shak_95
Frequent Visitor

Calculate the date up current week and up last week

Hi All,

 

This is the first time I have the honor to communicate with you.

 

I need a way to show 2 indicators :

1- A indicator to show the data from the start date up to the current week

2- A indicator to show the data from the start date up to last week

 

note, the weekday starts on Sunday and ends on Thursday.

 

 

Thanks for All,

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Shak_95 ,

 

Please check if this could meet your requirements:

 

1- A indicator to show the data from the start date up to the current week

 

This Week =
VAR Today_ =
    TODAY ()
VAR _endOfWeekDate =
    Today_ + 7
        - WEEKDAY ( Today_, 1 )
RETURN
    CALCULATE (
        SUM ( Table1[Value] ),
        Table1[Date] <= _endOfWeekDate,
        WEEKDAY ( Table1[Date], 1 ) IN { 1, 2, 3, 4, 5 }
    )

 

 

2- A indicator to show the data from the start date up to last week

 

Previous Week =
VAR Today_ =
    TODAY ()
VAR _endOfLastWeekDate =
    Today_ - WEEKDAY ( Today_, 1 )
RETURN
    CALCULATE (
        SUM ( Table1[Value] ),
        Table1[Date] <= _endOfLastWeekDate,
        WEEKDAY ( Table1[Date], 1 ) IN { 1, 2, 3, 4, 5 }
    )

 

 

 

If this couldn't help you, please check:

How to Get Your Question Answered Quickly - Microsoft Power BI Community

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

 

Best Regards,

Icey

 

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

View solution in original post

1 REPLY 1
Icey
Community Support
Community Support

Hi @Shak_95 ,

 

Please check if this could meet your requirements:

 

1- A indicator to show the data from the start date up to the current week

 

This Week =
VAR Today_ =
    TODAY ()
VAR _endOfWeekDate =
    Today_ + 7
        - WEEKDAY ( Today_, 1 )
RETURN
    CALCULATE (
        SUM ( Table1[Value] ),
        Table1[Date] <= _endOfWeekDate,
        WEEKDAY ( Table1[Date], 1 ) IN { 1, 2, 3, 4, 5 }
    )

 

 

2- A indicator to show the data from the start date up to last week

 

Previous Week =
VAR Today_ =
    TODAY ()
VAR _endOfLastWeekDate =
    Today_ - WEEKDAY ( Today_, 1 )
RETURN
    CALCULATE (
        SUM ( Table1[Value] ),
        Table1[Date] <= _endOfLastWeekDate,
        WEEKDAY ( Table1[Date], 1 ) IN { 1, 2, 3, 4, 5 }
    )

 

 

 

If this couldn't help you, please check:

How to Get Your Question Answered Quickly - Microsoft Power BI Community

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

 

Best Regards,

Icey

 

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

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)