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
Anonymous
Not applicable

Offset current month selection across multiple months in the future

Hi guys,

This is my first post on here so will try to be as clear as i can. I am new to PowerBi Desktop and have basic knowledge of how it works.
My current problem is as follows:

I have a sales dataset that includes contract start date, contract termination date, customer ID and customer Name.

I would like to create a filter that allows me to view contracts that are expiring in current and next 2 months to be able to target those customers.

I understand I could use a date filter with start to end date but would like something more "elegant". My aim is to have a date drop down selection e.g.
If I select February from the drop down many, i would like to see a list of contracts ending in February March and April.
If I select March, I would like to see a list to contracts ending in March, April and May.

The issue is that the drop down only filters on current month and I would like to somehow offset it to include the following 2 months in the current selection aswell.

Any help or advice would greatly be appreciated.

Thanks in advance.

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Yes , I know you need dropdown menu, while I tested and referred, find it is not supported to implement your desired output in Power BI Desktop currently, so I offer you this clumsy alternative solution.

 

While I have to agree that your demand is a good idea, so you can post your new idea https://ideas.powerbi.com/forums/265200-power-bi-ideas , to improve the Power BI Desktop.

 

It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,

Amy

 

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-xicai
Community Support
Community Support

Hi @Anonymous ,

 

Based on my test , it is can't implement your desired output completely. To work around this issue, you can try my solution following steps below.

 

Firstly, you can create calculated table DateDim ,then create column Month as the date month slicer.

 

DateDim = CALENDARAUTO()

Month = MONTH('DateDim'[Date])

 

Then create measure Filter1 in your data table(assuming table1), put measure Filter1 in the Visual Level Filter of goal table visual, and setting the Filter1 as "is not blank", don't forget click "Apply filter" button.

 

Filter1 = IF(CALCULATE(MIN('DateDim'[Date]),ALLSELECTED('DateDim'[Month]))<MAX(Table1[termination date])&&MAX(Table1[termination date])<=CALCULATE(MAX('DateDim'[Date]),ALLSELECTED('DateDim'[Month])),1,BLANK())

 

7.png

 

 

 

 

 

 

 

Finally ,set the date month slicer as "Between" but not "Dropdown", every time you type start month, then type the end month in value start month +2, for example the picture below.

 

1.png

 

 

 

 

 

 

Here is my test pbix: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EaN_3HJ0wMdBr8DFTcV-Vb0B2aNkfWW_FmZ6ax-mmvENwA?e=fidvDO

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Hi @v-xicai ,

 

Thank you for your reply and solution. 

I have tried to implement the solution and unfortunately its not exactly what I was looking for. 

My aim is to not have a slicer but a drop down menu which automatically sellects current and the next x months from a single user selection.

 

Are there any solutions to the problems statement?

 

Thanks

Hi @Anonymous ,

 

If my reply help your issue, so kindly mark my answer as a solution to help others having the similar issue and close the case.

 

Best regards

Amy Cai

 

Hi @Anonymous ,

 

Yes , I know you need dropdown menu, while I tested and referred, find it is not supported to implement your desired output in Power BI Desktop currently, so I offer you this clumsy alternative solution.

 

While I have to agree that your demand is a good idea, so you can post your new idea https://ideas.powerbi.com/forums/265200-power-bi-ideas , to improve the Power BI Desktop.

 

It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,

Amy

 

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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