Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am trying to setup a Trend Line for a Line Chart. Currently it does not appear in the Analytics tab but I know I need to change the X-Axis to Type Continuous.
When I do, it reverts back to Categorical.
I have read the following below where I need to have a date hierarchy with continuous dates:
https://community.powerbi.com/t5/Desktop/Axis-Labels-when-using-Trend-Line/m-p/498906#M232716
As far as I can see, everything is setup as need be:
I did just notice the exclamation point which when I tap on it I get the following error:
I know this issue has something to do with the hierarchy date as if use another column from my Calendar table, that error does not show up.
I duplicated the page and converted the chart to a Matrix and got no issues:
The DAX for my Calendar table is as follows:
PROD Calendar =
VAR Days = CALENDAR(MIN('LCP_Contacts'[Visited Date]),MAX('LCP_Contacts'[Visited Date]))
RETURN ADDCOLUMNS(
Days,
"Year", YEAR([Date]),
"Year Sort", 10000 - YEAR([Date]),
"Month Number", MONTH([Date]),
"Month", FORMAT([Date],"mmmm"),
"Month Year Number", YEAR([Date]) * 100 + MONTH([Date]),
"Month Year Text", FORMAT([Date],"mmm yyyy"),
"Date Month Number", DAY([Date]) + MONTH([Date]) * 100 + YEAR([Date]) *10000,
"Date Month Text", FORMAT([Date], "dd mmm"),
"Fiscal Year", YEAR([Date]+184),
"Fiscal Year Sort", 10000 - YEAR([Date]+184)
)
I also tried the following to check if there are any errors in the Date Column:
Measure = ISERROR(SUM('PROD Calendar'[Date]))
Which came back false.
I am a bit lost what to do from here.
Thanks
Hi @tiztrain,
I was not able to reproduce this problem on my side. Would you please share your sample .pbix file so that I can check for you? Do mask senssive data before sharing.
Regards,
Yuliana Gu
Also when making the change from Date Hierarchy to Date, the exclamation point disappears and I can do a Trend line:
OK found out that @SteelBreeze's comment solves the issue of the NaN error I have:
Still can't change the X-Axis type from Categorical to Continuous
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
83 | |
66 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |