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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Ani26
Helper III
Helper III

To show only next 12 months based on a slicer selection

Hi Team,

 

I have a requirement wherein I need to show 12 months after the month-year value selected in a slicer and also after that I need to show the remaining months as 'After <month-year>' and the months before the selected month in slicer as 'Prior to <month-year>'.

 

For example:

Suppose I select the month in the slicer as Apr'20, then i must get a table which gives me the output as below,

 

Labels
Prior to Apr'20
Apr'20
May'20
Jun'20
Jul'20
Aug'20
Sep'20
Oct'20
Nov'20
Dec'20
Jan'21
Feb'21
Mar'21
After Mar'21

 

I understand that I need to create a calculate table, but not understanding how to club the months as After Mar'21 and Prior to Apr'20 as there will be certain sum measures that will be coming up ahead in front of this table. But for now the requirement is to get th table in the above format.

 

Let me know in case any additional information required.

 

Thanks,

Ani

1 REPLY 1
Greg_Deckler
Super User
Super User

Right, there are ways to do this using what I call a Complex Selector. It is based upon the concept of the Inverse Selector. But, the details of its implemenation vary wildly depending on your data and what you are trying to accomplish.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Inverse-Selector/m-p/648290#M325

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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