cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
snemilipuri
Helper I
Helper I

Line Chart Should be till End of X axis

Hi,

 

I want to show the line chart till end of the x-axis although no data for some periods at the end. Please see the screenshot below. 

In this case, the redline is having data till 45'20 (x-axis)... but for the future dates it should replicate the value of 45'20, so that the red line will be straight from 45'20 to till end. Please help.

 

snemilipuri_0-1626945098754.png

 

3 REPLIES 3
amitchandak
Super User
Super User

@snemilipuri , get the last date value, Assume you have a measure 

 

new measure  =

var _last =lastnonbalnkvalue( Table[Date], [measure])

return 

if(isblank([measure]),_last   ,[measure])

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Hi @amitchandak,

 

It is still same. The logic which you have given will fill the blanks... but is not filling for the future dates. Please correct me if i am wrong. 

Hi @snemilipuri 

Could you share a sample with me by your Onedrive for Business? I need to know your data model. This will make it easier for me to understand your requirement.

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors