cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

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

1 ACCEPTED SOLUTION

Hi, @Shanvitha01 

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

108.png

 

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

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

110.png

 

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

112.png

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

117.png

 

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

View solution in original post

3 REPLIES 3
Super User IV
Super User IV

@Shanvitha01 ,

 

Create a new table as

new table = Distinct(union(all(Table[Name]), all(Table[category])))

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Hi Amit,

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

 

 

Thanks

Shanvitha S

Hi, @Shanvitha01 

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

108.png

 

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

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

110.png

 

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

112.png

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

117.png

 

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

View solution in original post

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors