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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.