Forum Discussion

Legend_11's avatar
Legend_11
Resolver I
2 years ago
Solved

Month Name from Week Number

WeekNumberMonth (calculated column)
1September (current week)
2September 
3September 
4September 
5October
6October
7October
8October
9November
10November

I am having a week number , I need to tag the week number 1 to current week (from there current month).

Anyone help me in creating this calculated column

  • Hi Legend_11 ,

    You can also try below DAX to create a calulated Date column as 

    CalculateDate = var todayDate = NOW()
    var calDate = DATE(YEAR(TODAY()), MONTH(TODAY()), DAY(TODAY()) + DataTbl[WeekNumber] * 7)
    return calDate

    Create a Month column with below DAX,
    Month = DataTbl[CalculateDate].[Month]



    Thanks!


    Inogic Professional Services

    An expert technical extension for your techno-functional business needs

    Power Platform/Dynamics 365 CRM

    Drop an email at [email protected]

    Service:  http://www.inogic.com/services/ 

    Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

2 Replies

  • Legend_11 , You can use this kind of logic

     

    Week Type =
    var _st = today() +-1*WEEKDAY(today() ,2)+1
    var _end = today() + 7-1*WEEKDAY(today(),2)
    return
    Switch( True(),
    [Date] >= _st && [Date] <= _end ,"This Week" ,
    [Date] >= _st-7 && [Date] <= _end -7,"Last Week" ,
    [Week Name]
    )

  • Hi Legend_11 ,

    You can also try below DAX to create a calulated Date column as 

    CalculateDate = var todayDate = NOW()
    var calDate = DATE(YEAR(TODAY()), MONTH(TODAY()), DAY(TODAY()) + DataTbl[WeekNumber] * 7)
    return calDate

    Create a Month column with below DAX,
    Month = DataTbl[CalculateDate].[Month]



    Thanks!


    Inogic Professional Services

    An expert technical extension for your techno-functional business needs

    Power Platform/Dynamics 365 CRM

    Drop an email at [email protected]

    Service:  http://www.inogic.com/services/ 

    Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/