Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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
Desired Output
Thank you
Solved! Go to Solution.
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:
Hi @AllanBerces ,
You can do this on two different ways in Power Query and in DAX.
Power Query:
DAX:
OverallForecastDAX =
CALCULATE(
SUM('Table'[Forecast]),
'Table'[Week] = EARLIEST('Table'[Week]),
REMOVEFILTERS(
'Table'[Area],
'Table'[Forecast]
)
)
Please see attach PBIX file.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @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:
Hi @Bibiano_Geraldo @MFelix Thank you very much for the reply, working perfectly
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 50 | |
| 33 | |
| 32 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 64 | |
| 64 | |
| 41 | |
| 27 | |
| 24 |