Forum Discussion

mikep7521's avatar
mikep7521
Helper III
8 years ago
Solved

Week Number for a certain date

I'm attempting to create a column/measure that captures what weeknum a certain date is in but i'm not receiving the correct answer. Below is my column and measure formula:

Column

Est. Close Date Week = WEEKNUM(Close Date.[Date],2)

Measure

Est. Close Date WeekNum = WEEKNUM(SUM(Close Date]),2)

 

Why am I not receiving the correct answer?

  • I figured out the issue. There were multiple installments that had the same closing date whcih is what was leading to the wrong values being displayed. 

11 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Perhaps the "." after the table name cause the issue, also enclose the table name in single quote as your table namehas space in it.Try the below one.

     

    Column

    Est. Close Date Week = WEEKNUM('Close Date'[Date],2)

     

    Thanks

    Raj

    • mikep7521's avatar
      mikep7521
      Helper III

      The I recieve an error code: The syntax for '[Date]' is incorrect. (DAX(WEEKNUM(Installment[Close_Date][Date],2))).

      • Anonymous's avatar
        Anonymous
        Not applicable

        Your formula is not correct. Can you share the snapshot of your formula? Or Share the exact formula you used.

         

        Thanks
        Raj

         

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi mikep7521

    There is something wrong with your formula, please look at the following test and correct your formula.

    Calculated column

    weeknum = WEEKNUM([Close Date],2)

     

    Measure

    Measure = WEEKNUM(MAX([Close Date]),2)

     

     

    Best Regards

    Maggie

     

  • I figured out the issue. There were multiple installments that had the same closing date whcih is what was leading to the wrong values being displayed.