Forum Discussion

butterscotch's avatar
butterscotch
Helper II
2 years ago
Solved

Combine column

Hello everyone !

i have table and i have column with date data type , when i select the column to be inserted to my table, the column divided into 2 , year and month, how do i combine it to become 1 column ?

What Happened :

 

What i want :


Thank you in advance !

  • Hii butterscotch 

    In a date column you used in visuals or tables, I will act as a hierarchy level in the below image (1. before).

    1. before

    Select the table visual, and in the visualization pane, right-click the date column and change the hierarchy to the original date as shown in the below image.

     

     

    Did I answer your question?

    Mark my post as a solution, this will help others...!

    Hit the kudo also,

    Thank you.

     

8 Replies

  • Hii butterscotch 

    In a date column you used in visuals or tables, I will act as a hierarchy level in the below image (1. before).

    1. before

    Select the table visual, and in the visualization pane, right-click the date column and change the hierarchy to the original date as shown in the below image.

     

     

    Did I answer your question?

    Mark my post as a solution, this will help others...!

    Hit the kudo also,

    Thank you.

     

    • Ahmedx's avatar
      Ahmedx
      Super User

      and try this

      Start date = FORMAT( DATEVALUE("01/"&'Table'[Month]&"/"&'Table'[Year]),"MMM-YY")

  • or in power query

    "01."&[Month]&"."& Text.From([Year])

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, butterscotch 

    Based on the information you have provided, Here are my answers to your questions.

    1. Create a new table as shown below.

     

    1. Create a new column and enter the following DAX code.

    Column =

        'Table'[Month] & "-" & RIGHT(FORMAT('Table'[Year],"0000"),2)

     

    1. What you end up with is what you need.

     

     

     

    How to Get Your Question Answered Quickly 

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

    Best Regards

    Yilong Zhou

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.