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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
BidyaSingha
Frequent Visitor

Filter on next cumulative available date take this month,next month and 1st day of 3rd month

 

Power query: Filter on next cumulative available date take this month, next month and 1st day of 3rd month.

Hello Everyone, I have "NextCumulativeAvailableDate" column where i need to filter in three cases

1st cases:this month(that is 1/05/2024 to 31/05/2024)
2nd cases:next month(that is 1/06/2024 to 30/06/2024)
3rd cases:1st day of 3rd month(that is only 1/07/2024)

all the above condition work fine from below M-query but it gives next year(i.e 2025 date) which is not required can you help me with correct query.

 

Code:
= Table.SelectRows(#"Filtered zero bench cases", each
Date.IsInCurrentMonth([NextCumulativeAvailableDate]) or
Date.IsInNextMonth([NextCumulativeAvailableDate]) or
(Date.Month([NextCumulativeAvailableDate]) = Date.Month(Date.AddMonths(DateTime.LocalNow(), 2)) and
Date.Day([NextCumulativeAvailableDate]) = 1)
)


Below SS for reference,

BidyaSingha_0-1716444420875.png

 

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.

Top Solution Authors