Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Add the same date to many rows

Hi,

In this table I want to add the reel starting date for all row with the same description:

 

Like this:

For all rows with F26 in description: 2018-06-06 11:58:43 for Reel_Start_Date

For all rows with C31 in description: 2018-05-30 09:21:28 for Reel_Start_Date.

For all rows with E76 in description: 2018-05-22 22:09:39 for Reel_Start_Date.

Etc.

Thanks 

  • Hi FRG,

     

    When a new row has been added, the calculate column can also work. Do you mean the new row be added is not in your three conditions? If you are, you can add another condition in the switch block.

     

    Regards,

    Jimmy Tao

3 Replies

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

    Hi FRG,

     

    Create a calculate column [Reel_Start_Date] using DAX formula as below and check if it works well.

     

    Reel_Start_Date =
    SWITCH (
        table[description],
        "F26", "2018-06-06 11:58:43",
        "C31", "2018-06-06 11:58:43",
        "E76", "2018-05-22 22:09:39"
    )
    

    You can click Reel_Start_Date column and change type from text to datetime through clicking Modeling->Format.

     

    Hope it's helpful to you.

     

    Jimmy Tao

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-yuta-msft,

      It works well but when a new row with a new description will appear I will have to modify my formula. Can we do it to create the Reel_Start_Date automatically?

      Thanks

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

        Hi FRG,

         

        When a new row has been added, the calculate column can also work. Do you mean the new row be added is not in your three conditions? If you are, you can add another condition in the switch block.

         

        Regards,

        Jimmy Tao