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
Pikachu-Power
Impactful Individual
Impactful Individual

numeric x-axis and trendline not possible

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?

 

Screenshot 2025-06-11 145430.png

 

1 ACCEPTED 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.

vkarpurapud_0-1749721898788.pngvkarpurapud_1-1749721926698.png

vkarpurapud_2-1749721955933.png vkarpurapud_3-1749721983673.png

 

 

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.





 

View solution in original post

6 REPLIES 6
Pikachu-Power
Impactful Individual
Impactful Individual

Hi @v-karpurapud 

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.

Pikachu-Power
Impactful Individual
Impactful Individual

Hi @v-karpurapud 

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.

vkarpurapud_0-1749721898788.pngvkarpurapud_1-1749721926698.png

vkarpurapud_2-1749721955933.png vkarpurapud_3-1749721983673.png

 

 

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.





 

v-karpurapud
Community Support
Community Support

Hi @Pikachu-Power

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.

vkarpurapud_1-1749712371633.png

 

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.

 




 

Pikachu-Power
Impactful Individual
Impactful Individual

Hi @rajendraongole1 

Not really suitable for my presentation with bar charts in combination with line chart.

Otherwise no possibility to take only the existing values? 🤔

 

 

 

rajendraongole1
Super User
Super User

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.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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.