Forum Discussion
Calculate Calendar Weeks using Union & ADDCOLUMN
- Anonymous2 years ago
Hi Austen229022 ,
Hope everything is going well.
We regret to inform you that there is currently no function that displays data based on the week Today is in.
Alternatives are:
Date Periods = UNION( ADDCOLUMNS(DATESBETWEEN(Sales[Datekey], TODAY()-7, TODAY()),"Type", "Week","Order",1), ADDCOLUMNS(DATESMTD(Sales[Datekey]), "Type", "Month","Order",2), ADDCOLUMNS(DATESYTD(Sales[Datekey]), "Type", "Year","Order",3) )Drag the fields of the table into the report page for display. The page effect is as follows:
It displays the date from the previous seven days to Today calculated based on Today.
If you want to know more about, please click on the following document.
DATESBETWEEN function (DAX) - DAX | Microsoft Learn
Pbix file is attached.
If there is anything else you need my help with please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Can you please explain your problem bit clearly.
- Austen2290222 years ago
Helper II
I am wanting to have it so that it shows the calendar week - same as MTD and YTD, instead of 7 days from today