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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
AllanBerces
Post Prodigy
Post Prodigy

Combine Sum per Row

Hi good day,

Can someone help me on my table, is there a way to sum the two area per row

  Asia Week1 + North Week 1 = Combine Week 1

AllanBerces_0-1738214710045.png

DESIRED OUTPUT

AllanBerces_1-1738214767511.png

Thank you

1 ACCEPTED SOLUTION

Hi @AllanBerces - please check this

 

rajendraongole1_0-1738217925462.png

 

Actual Remaining =
IF(
    Input[Area] = "Combine",
    VAR WeekNum = Input[Week No.]
    RETURN
        SUMX(
            FILTER(
                Input,
                Input[Area] IN {"Asia", "North"} && Input[Week No.] = WeekNum
            ),
            Input[Remaining]
        ),
    Input[Remaining]
)
 
rajendraongole1_1-1738217949467.png

 

 

Hope this would help





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

9 REPLIES 9
Abhijeet_40
Helper I
Helper I

It can be done using a pivot table.

Abhijeet_40_0-1738216264811.png

This can also be done using a measure.

Abhijeet_40_1-1738218386622.png

Total Remaining =
VAR CurrentArea = SELECTEDVALUE('Table'[Area])
VAR CurrentWeek = SELECTEDVALUE('Table'[Week])

RETURN
IF(
    CurrentArea = "Combine",
    CALCULATE(
        SUM('Table'[Remaining]),
        ALL('Table'),  -- Remove all filters
        'Table'[Area] IN { "Asia", "North" },
        'Table'[Week] = CurrentWeek
    ),
    SUM('Table'[Remaining])
)
rajendraongole1
Super User
Super User

Hi @AllanBerces - I have tried with measure as follows with one table input with above details. 

 

Actual Remaining Measure =
VAR WeekNum = SELECTEDVALUE(Input[Week No.])
RETURN
    CALCULATE(
        SUM(Input[Remaining]),
        Input[Area] IN {"Asia", "North"},
        Input[Week No.] = WeekNum
    )
 
can you please check this.
rajendraongole1_0-1738216726506.png

 

Hope it helps.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi @rajendraongole1 thank you fo the reply but i need calculated column. I tried the one you provided in column but no luck.

Hi @AllanBerces - please check this

 

rajendraongole1_0-1738217925462.png

 

Actual Remaining =
IF(
    Input[Area] = "Combine",
    VAR WeekNum = Input[Week No.]
    RETURN
        SUMX(
            FILTER(
                Input,
                Input[Area] IN {"Asia", "North"} && Input[Week No.] = WeekNum
            ),
            Input[Remaining]
        ),
    Input[Remaining]
)
 
rajendraongole1_1-1738217949467.png

 

 

Hope this would help





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi @rajendraongole1 thank you very much for the reply, working perfectly

@AllanBerces -Happy to Help

Thank you





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1738215985615.png

 

 

Jihwan_Kim_0-1738215955679.png

 

 

Actual Remaining measure: = 
SWITCH (
    SELECTEDVALUE ( area[area] ),
    "Combine", CALCULATE ( SUM ( data[remaining] ), ALL ( area[area], area[sort_order] ) ),
    SUM ( data[remaining] )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Hi @Jihwan_Kim thank you for the reply, I have only 1 table with Column Area, Week No. and Remaining.

 

Hi,

I suggest having a proper data model (star schema), but if you only have one table and cannot change the model, please try something like below.

 

Jihwan_Kim_0-1738216861425.png

 

 

Actual Remaining measure: = 
SWITCH (
    SELECTEDVALUE ( data[area] ),
    "combine", CALCULATE ( SUM ( data[remaining] ),  ALL ( data[area] ) ),
    SUM ( data[remaining] )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Helpful resources

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

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.