Forum Discussion
unknown_anony
1 year agoHelper II
Trend chart display bug
Hi,
I am preparing a trend chart,
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
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
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
1 Reply
- Kedar_PandeSuper 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