Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I created a column and line chart in Power BI with the X-axis set to
Year_Week = Calendar[Year]*100 + WEEKNUM(Calendar[Date_ID], 2)
It's numeric because I want to use a trendline. However, Power BI generates values on the X-axis that don't actually exist (see picture), like 202460, 202480, etc. I can't switch the X-axis to categorical either, because trendlines are not supported in that mode. So is it not possible to create trendlines for kalenderweeks?
Solved! Go to Solution.
Hi @Pikachu-Power
I have attached few snapshots. Please take a moment to review them and see if this solution aligns with your requirements.
If the issue still persists, please share the sample data and PBIX file. This will help us understand the problem more clearly and provide better assistance.
Good idea with Week_Start and Month_Start. Seems to work... i dont see any jumps in the visual.
But is it somehow possible to show the calenderweeks for the x-axis (not only tooltip)? 🙂
I have noticed that some colleagues using screenshots of this visual in their presentations, and it it would be great if we could implement that.
Thanks for your reply and the sample file. My situation: I have data for every day. On the x-axis i want day, calenderweek and month. With drill down and up i want to navigate between the three time dimensions. For calenderweek und month i have the aggregation of the data for every day. All three dimensions with trendline of course. Hope that helps to understand what i mean.
Hi @Pikachu-Power
I have attached few snapshots. Please take a moment to review them and see if this solution aligns with your requirements.
If the issue still persists, please share the sample data and PBIX file. This will help us understand the problem more clearly and provide better assistance.
Welcome to the Microsoft Fabric Community Forum. Also, thank you @rajendraongole1 for your prompt response.
Regarding your query on creating a trendline for calendar weeks in Power BI while I’m not fully aware of the exact structure of your dataset, I’ve created a sample .pbix file to demonstrate one possible solution that enables trendlines while avoiding non-existent X-axis values caused by using numeric Year_Week codes.
I’ve attached a screenshot and the .pbix file demonstrating this logic. Please review them to see if this solution aligns with your requirements.
If this doesn’t fully meet your needs, could you kindly share a sample of your data and more detailed context? That would help us provide a more accurate solution.
If this response resolves your query, kindly mark it as Accepted Solution to help other community members.
Thank you for being part of Fabric Community Forum.
Regards,
Karpurapu D,
Microsoft Fabric Community Support Team.
Not really suitable for my presentation with bar charts in combination with line chart.
Otherwise no possibility to take only the existing values? 🤔
Hi @Pikachu-Power -Use a scatter chart with Year_Week on X and your metric on Y.You can format the axis freely and still show a trendline.Just be sure to sort your data and label tooltips well.
I hope it works, please try and let know.
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |