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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
unknown_anony
Helper II
Helper II

Trend chart display bug

Hi,
 I am preparing a trend chart,

unknown_anony_0-1728040148933.png


in the data set i have value for only 2023 Dec, and Jan-Aug 2024, but in the above chart i am getting Dec in X axis for the year 2024
I have prepared a dimensiona calendar table by the below dax,

Calendar = CALENDAR([Startdate],[Enddate])
StartDate  and end Date is calculated from the facts table by MIN(), MAX() Function on the date column respectively, and i have passed the calulated date column in the above trend chart(X-Asix)
Is the calendar function causing an issue?
Any suggestion how to overcome this issue
Thank you
 
1 ACCEPTED SOLUTION
Kedar_Pande
Super User
Super User

Create Calendar Table

Calendar =
VAR MinFactDate = MIN('FactsTable'[DateColumn])
VAR MaxFactDate = MAX('FactsTable'[DateColumn])
RETURN
CALENDAR(MinFactDate, MaxFactDate)

Create a measure that calculates data points only for dates that exist in your fact table:

Filtered Values = 
CALCULATE(
SUM('FactsTable'[Value]),
NOT(ISBLANK('FactsTable'[Value]))
)


If this helped, a Kudos 👍 or Solution mark would be great!
Cheers,
Kedar Pande
www.linkedin.com/in/kedar-pande

View solution in original post

1 REPLY 1
Kedar_Pande
Super User
Super User

Create Calendar Table

Calendar =
VAR MinFactDate = MIN('FactsTable'[DateColumn])
VAR MaxFactDate = MAX('FactsTable'[DateColumn])
RETURN
CALENDAR(MinFactDate, MaxFactDate)

Create a measure that calculates data points only for dates that exist in your fact table:

Filtered Values = 
CALCULATE(
SUM('FactsTable'[Value]),
NOT(ISBLANK('FactsTable'[Value]))
)


If this helped, a Kudos 👍 or Solution mark would be great!
Cheers,
Kedar Pande
www.linkedin.com/in/kedar-pande

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.