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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors