Forum Discussion
Show and sort week period
Hi Community,
I´m trying to create a new column with week days like the image below, I could do that using a DAX from the forum but I can´t sort it in chronological order.
I tried to sort the new column with week number but I got a error saying "There can´t be more than one value in....."
No worries if the solution use another DAX solution, thanks.
Aucesar ,
Week start date can help to sort
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week Start Adjusted = if([Week Start date] < (eomonth([Date],-1)+1), (eomonth([Date],-1)+1), [Week Start date])
You can mark Week Start Adjusted as a sort column or
YYMM Week Start Adjusted = format([Week Start Adjusted], "YYYYMM")
YYMM Week Start Adjusted as sort column for week range
4 Replies
- amitchandak
Super User
Aucesar , Week start date can help to sort
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week Start Adjusted = if([Week Start date] < (eomonth([Date],-1)+1), (eomonth([Date],-1)+1), [Week Start date])
You can mark Week Start Adjusted as a sort column or
YYMM Week Start Adjusted = format([Week Start Adjusted], "YYYYMM")
YYMM Week Start Adjusted as sort column for week range
- amitchandak
Super User
Aucesar ,
Week start date can help to sort
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week Start Adjusted = if([Week Start date] < (eomonth([Date],-1)+1), (eomonth([Date],-1)+1), [Week Start date])
You can mark Week Start Adjusted as a sort column or
YYMM Week Start Adjusted = format([Week Start Adjusted], "YYYYMM")
YYMM Week Start Adjusted as sort column for week range
- Aucesar
Helper III
Dear amitchandak
Thanks for the super fast reply and working solution!!!
- VK_nz
Helper I
amitchandak this has helped a lot.. was stuck at it and found your solution working perferct. Thank you