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

limit the date table to not show beyond a certain date which is dynamic

date table should not show dates which are beyond the last date which is present in the date column of the other table..... 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: limit the date table to not show beyond a certain date which is dynamic

Hi,

 

Try this

 

=CALENDAR(MIN(Data[Dates]),MAX(Data[Dates]))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Super User III
Super User III

Re: limit the date table to not show beyond a certain date which is dynamic

@Nischal I don't know how you are currently building your date table, but if you do it by building a dax table using the value of the data table. My reference looks like this:

Date =
ADDCOLUMNS (
CALENDAR (MINX('DataTable', [DateValue]), (MAXX('DataTable',[DateValue]))),
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
"Year", YEAR ( [Date] ),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "YYYY/MM" ),
"YearMonthShort", FORMAT ( [Date], "YYYY/mmm" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date] ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "ddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" )
)

Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG
Super User IV
Super User IV

Re: limit the date table to not show beyond a certain date which is dynamic

Hi,

 

Try this

 

=CALENDAR(MIN(Data[Dates]),MAX(Data[Dates]))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors