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
ajitsahoo8338
Helper III
Helper III

How to filter Next "X" weeks data dynamically

I have created this table chart, where I am showing the project number and their releases with respect to the week number. I want to create a slicer where I can enter any number, and based on that number, it should filter the table to show the data for the next entered number of weeks. For example, if I enter 3 in the slicer, it should display data for the next 3 weeks. How can I achieve this?

ajitsahoo8338_0-1741863575204.png

 

1 ACCEPTED SOLUTION
Vijay_Chethan
Resolver III
Resolver III

Instead of table , matrix visual could be better for you use case 
where u can add project names in rows section while in date table you can create new column:

Week = WEEKNUM([Date],1)

use this Week in column section

Now create a Numeric field parameter(in Modelling tab) and name it say week_count

then create a measure:
(im assuming your each release is a different record in table, if not change accordingly)

project_count = 
var curr_week=WEEKNUM(Today(),1)
return
calculate(countrows(table[column]),filter(Date table,[Week]>curr_week && [Week]<curr_week+3))

now use this measure in the values section



if this helps you in any way, please accept it as solution

View solution in original post

4 REPLIES 4
v-venuppu
Community Support
Community Support

Hi @ajitsahoo8338 ,

I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.

Thank you.

Regards,

Rama U.

v-venuppu
Community Support
Community Support

Hi @ajitsahoo8338 ,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

 

Regards,

Rama U.

v-venuppu
Community Support
Community Support

Hi @ajitsahoo8338 ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Regards,

Rama U.

Vijay_Chethan
Resolver III
Resolver III

Instead of table , matrix visual could be better for you use case 
where u can add project names in rows section while in date table you can create new column:

Week = WEEKNUM([Date],1)

use this Week in column section

Now create a Numeric field parameter(in Modelling tab) and name it say week_count

then create a measure:
(im assuming your each release is a different record in table, if not change accordingly)

project_count = 
var curr_week=WEEKNUM(Today(),1)
return
calculate(countrows(table[column]),filter(Date table,[Week]>curr_week && [Week]<curr_week+3))

now use this measure in the values section



if this helps you in any way, please accept it as solution

Helpful resources

Announcements
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.