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! Learn more

Reply
sgk123
Frequent Visitor

Weekly Totals

I need to create a column with weekly totals

I have different locations and different items selled on different days.

I need a column like belowCapture.PNG

 

Or else I need a column with weekly average values.

Like the first and second row should display an average of 7.5 and all other rows to display 15 as weekly average.

 

Can some one please help me with this

 

 

 

2 ACCEPTED SOLUTIONS
Sean
Community Champion
Community Champion

CALCULATE ( SUM (Table[Amount]), ALLEXCEPT ( Table, Table[Week] ) )

You should add a YYYY-WW column and reference it in the formula not just the week number

View solution in original post

Sean
Community Champion
Community Champion

Weeekly Amount =
DIVIDE (
    CALCULATE (
        SUM ( 'Table'[Amount] ),
        ALLEXCEPT ( 'Table', 'Table'[Week], 'Table'[Location], 'Table'[Item] )
    ),
    CALCULATE (
        COUNTA ( 'Table'[Item] ),
        ALLEXCEPT ( 'Table', 'Table'[Week], 'Table'[Location], 'Table'[Item] )
    ),
    0
)

View solution in original post

3 REPLIES 3
Sean
Community Champion
Community Champion

CALCULATE ( SUM (Table[Amount]), ALLEXCEPT ( Table, Table[Week] ) )

You should add a YYYY-WW column and reference it in the formula not just the week number
sgk123
Frequent Visitor

I'm so sorry @Sean, I was little confused while asking the question.

It has to display based on the location, item and week - like below

LocationItemDateWeekAmountWeeklyAmount
AX1/1/2017155
BZ1/1/201711010
AX1/2/2017255
AZ1/2/201721015
BY1/2/201722020
AZ1/2/201722015

 

As 4 and 6 rows has same location, item and week, then it has to show the total

Sean
Community Champion
Community Champion

Weeekly Amount =
DIVIDE (
    CALCULATE (
        SUM ( 'Table'[Amount] ),
        ALLEXCEPT ( 'Table', 'Table'[Week], 'Table'[Location], 'Table'[Item] )
    ),
    CALCULATE (
        COUNTA ( 'Table'[Item] ),
        ALLEXCEPT ( 'Table', 'Table'[Week], 'Table'[Location], 'Table'[Item] )
    ),
    0
)

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors