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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tarun912
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

@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
amitchandak
Super User
Super User

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...

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 !

@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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

April Fabric Community Update

Fabric Community Update - April 2024

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

March 2024 PBI Gallery Image

Power BI Monthly Update - March 2024

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