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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Calculate MTD based of Weeks passed in the month

Hi everyone,

 

I would like to calculated running MTD based on the week number.

Here is my table data:

adriandumitru_0-1660309822030.png

So I would like a dax measure to calculate from the begining of the month ( now is august, week 31), until the last week in the month (today would be week 33, next week until week 34).

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pibx file.

It is for creating a measure.

 

Picture2.png

 

expected measure: =
IF (
    HASONEVALUE ( Data[Week] ),
    CALCULATE (
        SUM ( Data[Weight] ),
        FILTER (
            ALL ( Data ),
            Data[Year] = MAX ( Data[Year] )
                && Data[Month] = MAX ( Data[Month] )
                && Data[Week] <= MAX ( Data[Week] )
        )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Thank you @Jihwan_Kim 

Is working, but not as I want. It was my mistake to not write all the details.

I've added a date column in the table. Date(Year,Month, 1), the table beeing connected to a date table.

The report will be MTD filtered and I want the formula to work in a Card graph.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.