Forum Discussion
Anonymous
4 years agoNot applicable
11 Week Look Ahead Dynamic Calculation
Hello! I am stuck and I am really hoping that someone can help me write the DAX for the column to get the right results. Or advise on how to do this. I have a Scheduled Start Date column for when...
- 4 years ago
Hi, Anonymous
You can create this summary table, or use it as a table filter in other measures.
Like this:
Two columns first:
weekday = WEEKDAY([Date],2)weeknum = WEEKNUM([Date],1)Table1 = VAR a = MAXX ( FILTER ( ALL ( 'Table' ), [Date] = TODAY () ), [weeknum] ) RETURN SUMMARIZE ( FILTER ( ALL ( 'Table' ), [weeknum] = MAXX ( FILTER ( ALL ( 'Table' ), [weeknum] = a + 11 ), [weeknum] ) ), [Date], [weekday], [weeknum] )Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,
Community Support Team _ Janey - 4 years ago
HelloAnonymous
Because I don't know what your requirements are used for, so I just created a table.
You need to create table by new table button.
Reference:
SUMMARIZE function (DAX) - DAX | Microsoft Docs
Can you share your formula and error screenshots in the report? If you can describe in detail how your needs are presented in the report visual, I can help you more specifically.
Best Regards,
Community Support Team _ Janey
ValtteriN
4 years agoCommunity Champion
Hi,
Try creating this kind of measure:
11weeks = var _sdate =CALCULATE(MIN('Calendar'[Date]),ALL('Calendar'[Date]),
WEEKDAY('Calendar'[Date],2)=1,
WEEKNUM(TODAY())=WEEKNUM('Calendar'[Date]),
'Calendar'[Date]>TODAY()-7)
var _edate = _sdate + 7*11
var cdate = MAX('Calendar'[Date])
return
IF(cdate>=_sdate&& cdate<=_edate,1,0)
Then place it here:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/