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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
deSanta
Regular Visitor

creating line charts with trendlines

I want to create a line chart based on a data similar to the one below. need to have 'CLASS' in the x axis, and 'SCORE' in the y-axis. Then I need to add a trendline, and have a slicer for 'ID' .  Finnaly I need to have a card that shows the slope of the trendline. 

IDCLASSSCORE

1

a-2
2a1
3a6
1b4
2b3
3b-5
1c-2
2c4
3c6
1d-1
2d3
3d7

 

I am new at power BI, so I am not well versed in writting DAX. I noticed that power BI only shows the trendline option in the Analytics tab when both x and y axis are numerical. Also, I could not find an option to display the slope of the trendline even if I convert my categorical column into numerical. I tried to follow a previously posted example  to manually create the  trendlines, but the slope of the trendline I obtained never changes when a new ID is selected in the slicer.

 

I would sincerelly appreciate the help.  

1 REPLY 1
amitchandak
Super User
Super User

@deSanta , That option is only available with Date/Numbers on the x-axis

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.