Forum Discussion
joshua1990
Post Prodigy
3 years agoShow next 7 weeks based on Selection
Hi all!
I hve a simple sales table that is linked to a calendar table.
Now I would like to create a report (matrix visual) that shows me per article (row) the sales per week (column) based on wee...
- 3 years ago
Hi,
I would utilize a filter measure:
E.g. this measure shows the next 11 weeks: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*11var cdate = MAX('Calendar'[Date])returnIF(cdate>=_sdate&& cdate<=_edate,1,0)
You can make the measure to be dynamic by using another calendar and then referencig that in the dax.
End result:
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/
ValtteriN
Community Champion
3 years agoHi,
I would utilize a filter measure:
E.g. this measure shows the next 11 weeks:
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)
You can make the measure to be dynamic by using another calendar and then referencig that in the dax.
End result:
You can make the measure to be dynamic by using another calendar and then referencig that in the dax.
End result:
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/