cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Need previous year data month wise in a line chart

Hi everyone, 

Hope you guys are doing great. I am new to POWER BI, I want to implement one thing that if i have admissions data that contains admission ID and a DATE Column that contains date in this format (dd-mmm-yy) so, I would like to display a line chart that contains Admissions on a monthly basis and also 1 year back data.

For eg: Now it is April 2020 so I want the data to publish in a line chart is of Mar 2020 to Apr 2019.

Thanks !

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Need previous year data month wise in a line chart

@tarun912 ,

 

Generally, you may try using bookmark. Create a button "admissions" which can be pressed and configured the action of the button. For more details, please refer to doc below:

https://docs.microsoft.com/en-us/power-bi/desktop-buttons#select-the-action-for-a-button

https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks#using-bookmarks

 

Community Support Team _ Jimmy Tao

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

View solution in original post

3 REPLIES 3
Highlighted
Super User IX
Super User IX

Re: Need previous year data month wise in a line chart

You can use relative date slicer for that

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

 

In your date table, you can create a month year column and use that

Month Year = format([date],"mmm-yyyy")

You will also need a sort column for this

Month Year Sort = format([date],"yyyymm")

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

 

I am hosting a webinar on 25th April on Power BI, Check Details - https://www.linkedin.com/posts/amitchandak78_webinar-tech-techforgood-activity-6658266754378231808-y...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper IV
Helper IV

Re: Need previous year data month wise in a line chart

Hi @amitchandak , 

I got your point, but i can't use relative slicer thing as due to some UI Constraint, I will have to use some formula thing in the measure because I have a slicer that has a contains "admissions", by just pressing on this , I need my required line chart as descibed earlier.

Thanks !

Highlighted
Community Support
Community Support

Re: Need previous year data month wise in a line chart

@tarun912 ,

 

Generally, you may try using bookmark. Create a button "admissions" which can be pressed and configured the action of the button. For more details, please refer to doc below:

https://docs.microsoft.com/en-us/power-bi/desktop-buttons#select-the-action-for-a-button

https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks#using-bookmarks

 

Community Support Team _ Jimmy Tao

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

View solution in original post

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors