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
nakulprajapati2
Regular Visitor

SUM of max by category and rows with value

I need to calculate the sum of Maximum resource used on that day. 

I am using the below formula but doesnt show me what the values are shown in excel. 

SUM of Max Working = 
SUMX (
    SUMMARIZE ( Sheet1,Sheet1[Date], Sheet1[Resource Name],Sheet1[Activity Name] ),
    CALCULATE ( MAX( ( Sheet1[Value] ) )
))

I have been struggling with this for a very long time now, and thought to finally seek help from the experts. 

nakulprajapati2_0-1661803932535.png

1 ACCEPTED SOLUTION
v-yadongf-msft
Community Support
Community Support

Hi @nakulprajapati2 ,

 

This is my test table. Before you import the data, please add an index column named ID in Excel or Power Query.

vyadongfmsft_0-1662026119834.png

 

Then please try following DAX to create a new column:

Column = IF(
    'Table'[Activity me] = "Activity1",
    CALCULATE(
        SUM('Table'[value]),
        FILTER('Table','Table'[ID] >= EARLIER('Table'[ID]) && 
                       'Table'[ID] <= EARLIER('Table'[ID])+7)
        )
        )

 

Create a table visual like below:

vyadongfmsft_1-1662026119837.png

 

Best regards,

Yadong Fang

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
v-yadongf-msft
Community Support
Community Support

Hi @nakulprajapati2 ,

 

This is my test table. Before you import the data, please add an index column named ID in Excel or Power Query.

vyadongfmsft_0-1662026119834.png

 

Then please try following DAX to create a new column:

Column = IF(
    'Table'[Activity me] = "Activity1",
    CALCULATE(
        SUM('Table'[value]),
        FILTER('Table','Table'[ID] >= EARLIER('Table'[ID]) && 
                       'Table'[ID] <= EARLIER('Table'[ID])+7)
        )
        )

 

Create a table visual like below:

vyadongfmsft_1-1662026119837.png

 

Best regards,

Yadong Fang

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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