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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DAX To calculate current week , next and next to next dynamically

Hello Everyone,

 

I have a requirement where in I have to display the next 2 week data in a table based on the date user select 

say the user select 24-oct-2022 then i should display data from 24 oct 2022 to 4 nov 2022.

 

Date slicer contains the values in this format .

Mshubhangi_0-1667041295079.png

But I am unable to achieve the required output, Can anyone please help me resolve this issue.
 
 
 
Thanks.
Shubhangi

 

3 REPLIES 3
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, I have created a simple sample :

vjianbolimsft_2-1667380003505.png

 

Please try:

First, created a date table for slicer:

vjianbolimsft_3-1667380019023.png

 

Then apply the measure to the filter:

 

Measure = 
var _a = SELECTEDVALUE('Date'[Date])
return IF(MAX('Table'[Date])>=_a&&MAX('Table'[Date])<=_a+13,1,0)

 

vjianbolimsft_4-1667380247956.png

Final otput:

vjianbolimsft_5-1667380269129.png

Best Regards,

Jianbo Li

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-jianboli-msft 

This seems good, but i want to see 4 weeks data in 4 different table in a single page of the dashboard based on date selected in the slicer.

Please let me know you inputs

AbbasG
Memorable Member
Memorable Member

@Anonymous Hi due tried the relative date slicer? It might solve your problem.

AbbasG_0-1667043943412.pngAbbasG_1-1667044060652.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors