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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

MTD without using a date table

When creating smaller reports; I add year and month columns to the existing dataset according to whatever the "DATE" field is. 

 

Ex:

DATE            YEAR      MONTH

1/2/2017      2017          1

1/3/2017      2017          1

3/5/2016      2016          3

6/8/2016      2016          6

7/28/2016    2016          7

7/25/2016    2016          7

7/25/2017    2016          7

 

I am creating visualizations, and I want them to only show MTD. ( So the 7/28/2016 data will not be on the visual )

How do I do this?

 

1 ACCEPTED SOLUTION
fhill
Resident Rockstar
Resident Rockstar

If you can work with Current Week or Prevoius Weeks, this might work... 

 

I've added 2 calculated columns and 1 measure to your data to accomplish (by week) your desired filtering.  WeekNum will return a number 1-52 of the week from your date.  Using it again with TODAY() returns today's weekNum.  The Calculated Column is then used in a filter to only show values with WEEKNUM less than or equal to TODAY()'s weekNum.

 

 

Measure:

TodaysWeek = WEEKNUM(TODAY())

 

Cal. Colmuns:

Week = WEEKNUM(Table1[DATE        ])

Display = IF(Table1[Week] <= [TodaysWeek],1,0)

*** If you don't want current week, only previous weeks, change <= to < ***

 

 

Capture.PNG




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




View solution in original post

2 REPLIES 2
fhill
Resident Rockstar
Resident Rockstar

If you can work with Current Week or Prevoius Weeks, this might work... 

 

I've added 2 calculated columns and 1 measure to your data to accomplish (by week) your desired filtering.  WeekNum will return a number 1-52 of the week from your date.  Using it again with TODAY() returns today's weekNum.  The Calculated Column is then used in a filter to only show values with WEEKNUM less than or equal to TODAY()'s weekNum.

 

 

Measure:

TodaysWeek = WEEKNUM(TODAY())

 

Cal. Colmuns:

Week = WEEKNUM(Table1[DATE        ])

Display = IF(Table1[Week] <= [TodaysWeek],1,0)

*** If you don't want current week, only previous weeks, change <= to < ***

 

 

Capture.PNG




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Anonymous
Not applicable

Add a measure:

 

MTD = NOW()

 

Then use this measure to your visuzlization as a filter where date column < MTD.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.