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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Jiji0129
New Member

Selected date returns data + future + 12 weeks

Hi guys, could you please help me with this scenario? I got a table below which I created a calculated columns that is returning current week + future 12 weeks. It is working fine. However, I would like to add a date filter, this time want to see the same logic if I select previous date. Say if I select January 1, 2023, it will show me Jan 1 + future 12 weeks data.

Jiji0129_0-1673399793729.png

 


Could you please confirm if this is possible? This is my current measure which is not showing progress at all.
Test =
VAR ReferenceDate = SELECTEDVALUE('Date'[Date])
VAR PreviousDates =
DATESINPERIOD(
'Date'[Date], ReferenceDate,3,MONTH)
VAR _Weeknum =
WEEKNUM( 'Date', 1 )
VAR _Weeknumtoday =
WEEKNUM( TODAY(), 1 )
VAR Week_Filter = SELECTEDVALUE('Date'[Start of Week])
VAR _Weeks =
CALCULATE(
Weeknum >= Weeknumtoday
&& Weeknum <= Weeknumtoday + 12)
VAR Test =
CALCULATE([Incomings], FILTER('Date','Date'[Date] >= _Weeks && 'Date'[Date] <= ReferenceDate))
RETURN
_Weeks

1 REPLY 1
amitchandak
Super User
Super User

@Jiji0129 , if I select a date and need more than that, them My Slicer should be independent date table 

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max1 = maxx(allselected(Date1),Date1[Date])
var _min = _max1 - weekday(_max1,2)+1

Var _max = _min + 7*12 -1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

 

 

Also check

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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