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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

How come this DAX Generate series as DATE does end as intended

New Table ->
DatesTest =
var currentDatint = day(today())
VAR CurrentMonthInt = MONTH ( TODAY () )
var currentYear = year(today())
var seriesDate = GENERATESERIES(Date(2022, 1, 1) , DATE(currentYear, CurrentMonthInt, currentDatint))
return seriesDate

when used it still returns the full year of end not up to the current date. 
1 ACCEPTED SOLUTION

Hi, @Anonymous 

If you  enable 'Auto date/time option' in Options Pane of PowerBI, Power BI Desktop creates a hidden auto date/time table for each date column. The auto date/time table contains full calendar years encompassing all date values stored in the model date column.  Auto date/time tables are permanently hidden.

The date hierarchy you see is based on this auto date/time table.When an auto date/time table exists for a date column (and that column is visible), report authors won't find that column as a field in the Fields pane. Instead, they find an expandable object that has the name of the date column.

veasonfmsft_0-1661506650911.png

 

For more details, please refer to this document

Apply auto date/time in Power BI Desktop 

 

Best Regards,
Community Support Team _ Eason

View solution in original post

3 REPLIES 3
davehus
Memorable Member
Memorable Member

Hi @Anonymous ,

 

I've tested your measure and it works fine. 

davehus_0-1661268359276.png

 

Anonymous
Not applicable

I see. How come the Date Hieracrchy part returns the full Date range and not the the range based on the values?

bob3434343_0-1661268973706.png

 

Hi, @Anonymous 

If you  enable 'Auto date/time option' in Options Pane of PowerBI, Power BI Desktop creates a hidden auto date/time table for each date column. The auto date/time table contains full calendar years encompassing all date values stored in the model date column.  Auto date/time tables are permanently hidden.

The date hierarchy you see is based on this auto date/time table.When an auto date/time table exists for a date column (and that column is visible), report authors won't find that column as a field in the Fields pane. Instead, they find an expandable object that has the name of the date column.

veasonfmsft_0-1661506650911.png

 

For more details, please refer to this document

Apply auto date/time in Power BI Desktop 

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.