Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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, @Anonymous 

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
amitchandak
Super User
Super User

@Anonymous ,

 

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.

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

Hi, @Anonymous 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.