Forum Discussion

Aucesar's avatar
Aucesar
Icon for Helper III rankHelper III
2 years ago
Solved

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 ...
  • amitchandak's avatar
    2 years ago

    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