cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

How Fix the color of Lines in a line chart when data changes ( chart show last N months data)

Hello !!

My requirement is my line chart always show last 4 months data, so we see 4 lines in my chart,

how we can fix the color code of these lines irrespective of month changes.

Say in July - > the report shows lines for Apr, May, June & July -> colors are Grey,Black, Green,Red

 

When month changes -> the report will have May, June, July and August -> here I still need the same colors Grey, black , Green & Red.

 

Appreciate any help on this .

5 REPLIES 5
Highlighted
Community Champion
Community Champion

Re: How Fix the color of Lines in a line chart when data changes ( chart show last N months data)

Instead of showing the month names can you show "Current month","Current-1","Current-2","Current-3"? This would require setting up calculated columns accordingly.

 

That way the labels will be the same and the color won't change.

Highlighted
Regular Visitor

Re: How Fix the color of Lines in a line chart when data changes ( chart show last N months data)

Thanks for your prompt response, the month names Apr, May , June are not calculated values, they are the values from Month column, when I use the month column in my legend the line for over all amount  splits in to multiple line for each month ( There is a month filter to show only last 4 months)

Highlighted
Regular Visitor

Re: How Fix the color of Lines in a line chart when data changes ( chart show last N months data)

Day of month (1 to 31 days) on my axis 

Amount (This is cumulative amount of each day of a month) on Values 

Month on Legend

Highlighted
Community Champion
Community Champion

Re: How Fix the color of Lines in a line chart when data changes ( chart show last N months data)

I know they are not but if you make them calculated columns (during data refresh) then it can work.

Highlighted
Regular Visitor

Re: How Fix the color of Lines in a line chart when data changes ( chart show last N months data)

but will my tooltip on line chart shows the month name of each line ?

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.