cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Post Prodigy

## Dinamically calculating based on per week

hi there

i need a dax formula but in power bi , i have an table , that table has two column , one of the column name is "date" and has some dates , and the other column's name is "quantity" , this quantity named column has some quantities , i want to calculate the total quantity for each week of the current month, where a week starts on Monday and ends on Sunday.

Here is my table :

i want to calculate the total quantity for each week of the current month, where a week starts on Monday and ends on Sunday , as below table .

Super User

@erhan_79 , Try a new column like

Month Week =
var _monthweek = (eomonth([Date],-1)+1) -WEEKDAY((eomonth([Date],-1)+1),2)+1 //monday
var _week = [Date] -WEEKDAY([Date],2)+1 //monday
return
QUOTIENT(DATEDIFF(_monthweek,_week,DAY),7)+1

Convert to text then

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors