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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.