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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Problem adding per week

Good afternoon.

I'm trying to generate a table that allows me to add up the values for the week and publish them to me on Monday of that week.

An example of the data

jdpadra_0-1727376935772.png


He should be able to add up the soda values that are part of week 32, and post them on day 1 of that week.
The same for week 33. I'm omitting additional data, but it still works as an example.

I don't know how to make this dax work

2 REPLIES 2
Anonymous
Not applicable

Hi ALL
Firstly ryan_mayu  thank you for your solution!
And @Syndicate_Admin ,The main thing we've implemented here is a dynamic filter to ensure that your data for the first day of the week doesn't stack up and only shows the weekly soda totals.

 

sales filter = 
VAR B=CALCULATE(SUM('Table'[Total Sales Accumulated]),FILTER(ALL('Table'),'Table'[Week]=MAX('Table'[Week])&&'Table'[Business]=SELECTEDVALUE('Table'[Business])))
RETURN
IF(
    MAX('Table'[Day])=1&&MAX('Table'[Week])=SELECTEDVALUE('Table'[Week])&&MAX('Table'[Business])=SELECTEDVALUE('Table'[Business]),
    B,
    MAX('Table'[Total Sales Accumulated])

 

vxingshenmsft_0-1727403663545.png

I hope my answer can solve your problem, if you have further questions, you can contact me at any time, I will be the first time to reply to you after receiving your message!

Hope it helps!

 

Best regards,
Community Support Team_ Tom Shen

 

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

 

 

ryan_mayu
Super User
Super User

maybe you can try this

 

calculate(sum(value),allexcept(table, [year},[mes],[Semana]))





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

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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