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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
DSwezey
Helper III
Helper III

Display sum of each week ending for selected month

Hi All,

 

I want to be able to dynamically display the sum of [Sales Amount] for each week of the current selected month.

 

For example, if I have 10/20/2021 selected then I want all the sums of each week ending for October.

EX: Week ending: 10/24, 10/17, 10/10, 10/3. 

DSwezey_0-1636567729616.png

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @DSwezey ,

 

Assuming that your date slicer is using calendar[date], that your calendar is related to your fact table, and that you have a [week ending] field in your calendar table to be used in the visual, you could manage this by removing context filters from within the measure.

Something like this should work:

_monthSales =
VAR __cDate =
MAX(calendar[date])
RETURN
CALCULATE(
    SUM(factTable[Sales Amount]),
    FILTER(
        ALL(calendar),
        MONTH(__cDate) = MONTH(calendar[week ending])
    )
)

 

This gives me the following ouput:

BA_Pete_0-1636620606792.png

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hi @DSwezey ,

 

Assuming that your date slicer is using calendar[date], that your calendar is related to your fact table, and that you have a [week ending] field in your calendar table to be used in the visual, you could manage this by removing context filters from within the measure.

Something like this should work:

_monthSales =
VAR __cDate =
MAX(calendar[date])
RETURN
CALCULATE(
    SUM(factTable[Sales Amount]),
    FILTER(
        ALL(calendar),
        MONTH(__cDate) = MONTH(calendar[week ending])
    )
)

 

This gives me the following ouput:

BA_Pete_0-1636620606792.png

 

Pete

BA_Pete
Super User
Super User

Hi @DSwezey ,

 

Assuming that your date slicer is using calendar[date], that your calendar is related to your fact table, and that you have a [week ending] field in your calendar table to be used in the visual, you could manage this by removing context filters from within the measure.

Something like this should work:

_monthSales =
VAR __cDate =
MAX(calendar[date])
RETURN
CALCULATE(
    SUM(factTable[Sales Amount]),
    FILTER(
        ALL(calendar),
        MONTH(__cDate) = MONTH(calendar[week ending])
    )
)

 

This gives me the following ouput:

BA_Pete_0-1636620606792.png

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI 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.