Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

One column values by another column values as single column

HI Power BI export,

my input values is:

NAMECATEGORY
Aalal
Afes
Afd
Aer
Bwe
Brt
Cer
Cwe
Cwr
Dt

 

Out should be Combine name and Category but Name first values then Catogry values

below is my output

 

Name/CATEGORY
A
alal
fes
fd
er
B
we
rt
C
er
we
wr
D
t

 

 

Thanks

Shanvitha S

  • Hi, Anonymous 

    I have a workaroud you can take a try.
    Duplcate a new table as "Categeory",create a index column for "Categeory Column"

     

    Duplicate a new table as "Name" ,group by "column name" to get the min categeory index.


    Subtract 0.1 from the min categeory index value to get the index  value of name as below:

     

    Then  append Table"Name" and Table"Categeory " as a new table:

    Sort this table by column index  in table visual,the result will show as below:

     

    For more details,please check the attached pbix file.

    You can also use dax formula to implement the above steps to create such a table, but it may be more cumbersome.

     

    Best Regards,
    Community Support Team _ Eason

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Amit,

      Your querys display assending order values but me required only how i am give out format similar type required.

       

       

      Thanks

      Shanvitha S

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

        Hi, Anonymous 

        I have a workaroud you can take a try.
        Duplcate a new table as "Categeory",create a index column for "Categeory Column"

         

        Duplicate a new table as "Name" ,group by "column name" to get the min categeory index.


        Subtract 0.1 from the min categeory index value to get the index  value of name as below:

         

        Then  append Table"Name" and Table"Categeory " as a new table:

        Sort this table by column index  in table visual,the result will show as below:

         

        For more details,please check the attached pbix file.

        You can also use dax formula to implement the above steps to create such a table, but it may be more cumbersome.

         

        Best Regards,
        Community Support Team _ Eason