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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ankit2747
Frequent Visitor

How to get data of last n periods on basis of filter

Hello All,

 

Can someone help me on below scenario;

 

I have 2 columns "Date" and "Amount" and a filter on "Date".

 

I want to filter data in my visual for last "N" months on basis of date selected in "Date" filter.

 

Any input is highly appreciated. Thanks!

1 ACCEPTED SOLUTION

Hi @ankit2747,

 

For your scenario, I think you should create a measure to show the amount dynamiclly based on your selectvalue in the slicer.

 

Here is a sample which should be similar to your scenario. You could have a good look at it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
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

4 REPLIES 4
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @ankit2747,

 

As pattemmanohar mentioned, you could use visual level filter like below.

 

Capture.PNG

 

If you still need help, please describe your scenario in more details.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello,

 

Thanks for your response.

The solution you suggested filters data according to today's date. But in my scenario, I need that if I select a date in Slicer , the data gets filtered for say last 12 months from the date selected in slicer.

 

 

Hi @ankit2747,

 

For your scenario, I think you should create a measure to show the amount dynamiclly based on your selectvalue in the slicer.

 

Here is a sample which should be similar to your scenario. You could have a good look at it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PattemManohar
Community Champion
Community Champion

@ankit2747 Please try using "Visual Level Filters" option





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors