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
ZeDe
Frequent Visitor

Trendline no longer available when going the a lower hierarchy-level

Hi,

I have a bar chart with a date hierarchy on the axis and Sales-numbers as the values. When it's showing the default view (years on the axis) I have the possibility to add a trendline, as shown in the picture.

ZeDe_1-1648024235543.png

If I click the most right hierarchy-button (to get to a lower level), I get the exact view I want. But as shown in the second picture, there is no option here to show a trendline. 

ZeDe_2-1648024369857.png

 

Am I doing something wrong here or is there a workaround to show a trendline on the second visual?

Also there are 65-ish bars and it's only showing like 50 or so. Is there a way to fix this as well?

 

Thank you very much

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Yours is a good solution , I thought of another one.
Month = Year('Calendar'[Date]) &”-“&Month('Calendar'[Date])
and set it to date format ,Then click here to achieve the desired effect.
jak11_0-1648112744671.pngjak11_1-1648112829017.png

 

 

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Do not use date hierarchy  ,the trend line can be displayed normally by using the year, month and day of the date table.😮

Hi @Anonymous ,

I tried linking my date values of my primary table to those of my date table, Added a non-hierarchy Year and Month column. Unfortunately I still don't have the option to select a trendline.

ZeDe_0-1648029118177.png

 

Anonymous
Not applicable

you month is not a normal date format.

@Anonymous  

These are my DAX-formulas I used to add a calculated column for year and month that i used on my visual:
Year = Year('Calendar'[Date])
Month = Month('Calendar'[Date])
 
I think that if you want to add a trendline you can only do this when you have one value on your X-axis, and it must be a numerical one (not a categorical).
And as I am using two numerical values (year and month) on my axis, it automatically switches to categorical. The only solution now is the make a bar chart combined with a line chart that displays the trendline through a DAX-formula.
Or am I missing something?
 
Kind regards
Anonymous
Not applicable

Yours is a good solution , I thought of another one.
Month = Year('Calendar'[Date]) &”-“&Month('Calendar'[Date])
and set it to date format ,Then click here to achieve the desired effect.
jak11_0-1648112744671.pngjak11_1-1648112829017.png

 

 

 

Hi @Anonymous, I missed the part where i changed the format of my field to date...

Thank you for pointing this out!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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