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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jbrooks91
New Member

Null Values showing when creating date table - source data is not null

Hi All,

 

I've created a date table in my schema in order to do some different "slicing and dicing" but for some reason it doesn't seem to be picking up "new" dates in my table. Even when I hit "refresh" I will still end up with some null values. Any idea why?

Date Table:

Date =
VAR MinDate =
    DATE( YEAR( MIN( 'Survey'[responsedate] ) ), MONTH( MIN( 'Survey'[responsedate] ) ), 1 )
VAR MaxDate =
    DATE( YEAR( MAX( 'Survey'[responsedate] ) ), MONTH( MAX( 'Survey'[responsedate] ) ), 1 )
VAR DateRange =
    CALENDAR( MinDate, MaxDate )
RETURN
ADDCOLUMNS(
    DateRange,
    "Year", YEAR( [Date] ),
    "MonthNumber", MONTH( [Date] ),
    "MonthName", FORMAT( [Date], "MMMM" ),
    "MonthYear", FORMAT( [Date], "MMM YYYY" ),
    "Quarter", "Q" & FORMAT( [Date], "Q" ),
    "YearMonthNumber", YEAR( [Date] ) * 100 + MONTH( [Date] ), // Useful for sorting
    "MonthIndex", DATEDIFF( MinDate, [Date], MONTH ) + 1
)

jbrooks91_1-1739559325076.png

 



1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jbrooks91 

 

Thank you very much FarhanJeelani for your prompt reply.

 

Try this:

 

Date = 
VAR MinDate =
    MINX(FILTER('Survey', NOT(ISBLANK('Survey'[responsedate]))), 'Survey'[responsedate])
VAR MaxDate =
    MAXX(FILTER('Survey', NOT(ISBLANK('Survey'[responsedate]))), 'Survey'[responsedate])
VAR DateRange =
    CALENDAR(MinDate, MaxDate)
RETURN
ADDCOLUMNS(
    DateRange,
    "Year", YEAR([Date]),
    "MonthNumber", MONTH([Date]),
    "MonthName", FORMAT([Date], "MMMM"),
    "MonthYear", FORMAT([Date], "MMM YYYY"),
    "Quarter", "Q" & FORMAT([Date], "Q"),
    "YearMonthNumber", YEAR([Date]) * 100 + MONTH([Date]), // Useful for sorting
    "MonthIndex", DATEDIFF(MinDate, [Date], MONTH) + 1
)

 

Here is the result.

 

vnuocmsft_0-1739776689462.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @jbrooks91 

 

Thank you very much FarhanJeelani for your prompt reply.

 

Try this:

 

Date = 
VAR MinDate =
    MINX(FILTER('Survey', NOT(ISBLANK('Survey'[responsedate]))), 'Survey'[responsedate])
VAR MaxDate =
    MAXX(FILTER('Survey', NOT(ISBLANK('Survey'[responsedate]))), 'Survey'[responsedate])
VAR DateRange =
    CALENDAR(MinDate, MaxDate)
RETURN
ADDCOLUMNS(
    DateRange,
    "Year", YEAR([Date]),
    "MonthNumber", MONTH([Date]),
    "MonthName", FORMAT([Date], "MMMM"),
    "MonthYear", FORMAT([Date], "MMM YYYY"),
    "Quarter", "Q" & FORMAT([Date], "Q"),
    "YearMonthNumber", YEAR([Date]) * 100 + MONTH([Date]), // Useful for sorting
    "MonthIndex", DATEDIFF(MinDate, [Date], MONTH) + 1
)

 

Here is the result.

 

vnuocmsft_0-1739776689462.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

 

FarhanJeelani
Super User
Super User

Hi @jbrooks91 , It looks like your date table might not be capturing the full range of dates, leading to null values. A few key points to check:

 

MaxDate Issue:

Your Maxdate is currently set to the start of the month (DATE(YEAR(MAX('Survey'[responsedate])), MONTH(MAX('Survey'[responsedate])), 1)), which might exclude dates after the first day of the last month.

 

Fix: Use EOMONTH to capture the full month:

DAX

VAR MaxDate = EOMONTH(MAX('Survey'[responsedate]), 0

 
Null Values in the visual:
Ensure that the relationship between your Date table and the Survey table is a one-to-many 

(Date[Date] -> Survey[responsedate]).

In your visual settings, uncheck "Show items with no data" under the Fields pane if it is selected.

 

Please mark this as solution if it helps you. Appreciate Kudos.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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