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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.