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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
AllanBerces
Post Prodigy
Post Prodigy

Sum per Week

Hi good day,

I need some help on my calculated column. I want the sum of forecast of each week for both area.

Week1 = North forecast + SouthEast forecast

Week2 = North forecast + SouthEast forecast

AllanBerces_0-1738140951007.png

Desired Output

AllanBerces_1-1738141081840.png

Thank you

1 ACCEPTED SOLUTION
Bibiano_Geraldo
Super User
Super User

Hi @AllanBerces ,

You can achieve the desired output by creating a new calculated column with this DAX:

OverallForecast =
VAR CurrentWeek = 'Table'[Week No.]
RETURN
CALCULATE(
    SUM('Table'[Forecast]),
    ALLEXCEPT('Table', 'Table'[Week No.])
)

 

Your output will look like this:
 

Bibiano_Geraldo_0-1738143910311.png

 

View solution in original post

4 REPLIES 4
mdaatifraza5556
Super User
Super User

HIi @AllanBerces Please try the below dax to get your result

Overall_Forecast =
    SUMX(
        FILTER(
            Region,
            Region[Week No] = EARLIER(Region[Week No])
        ),
        Region[Forecast]
    )
MFelix
Super User
Super User

Hi @AllanBerces ,

 

You can do this on two different ways in Power Query and in DAX.

 

Power Query:

  • Do a group by week
  • Select a sum of the forecast and all the rows

MFelix_0-1738143633811.png

 

  • Expand the columns Area and forecast from the new column created.

MFelix_1-1738143663618.png

 

 

DAX:

  • Add the following code to your table:
OverallForecastDAX = 
        	CALCULATE(
	        	SUM('Table'[Forecast]),
		        'Table'[Week] = EARLIEST('Table'[Week]),
		        REMOVEFILTERS(
			        'Table'[Area],
			        'Table'[Forecast]
		            )
	        )

 

MFelix_2-1738143893801.png

 

Please see attach PBIX file.

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





Bibiano_Geraldo
Super User
Super User

Hi @AllanBerces ,

You can achieve the desired output by creating a new calculated column with this DAX:

OverallForecast =
VAR CurrentWeek = 'Table'[Week No.]
RETURN
CALCULATE(
    SUM('Table'[Forecast]),
    ALLEXCEPT('Table', 'Table'[Week No.])
)

 

Your output will look like this:
 

Bibiano_Geraldo_0-1738143910311.png

 

Hi @Bibiano_Geraldo @MFelix Thank you very much for the reply, working perfectly

Helpful resources

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