cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

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

Accepted Solutions
fhill Senior Member
Senior Member

Re: MTD without using a date table

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

View solution in original post

2 REPLIES 2
fmx Regular Visitor
Regular Visitor

Re: MTD without using a date table

Add a measure:

 

MTD = NOW()

 

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

fhill Senior Member
Senior Member

Re: MTD without using a date table

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

View solution in original post

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)