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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
azharkhan
Regular Visitor

anyway to extract column name for the value equals 'X' in power BI?

Hello,

My first ever question on this forum. I am relatively new to Power BI and would really appreciate support from the experts in the community.

I am trying to extract the column names for each values of 'X'. I need to look at columns B to J.
Is there a way to do this in power BI.

Appreciate any help. I have attached a screenshot to help understand, let me know if you need more information.

Many Thanks
Azhar

 

azharkhan_0-1656000773573.png

 

1 ACCEPTED SOLUTION
azharkhan
Regular Visitor

This is not the perfect solution but the best I could work out so far.

 

you can select the all the columns where you need to find the value 'X', then in Query Editor unpivot these column to row data like picture below, click "Close & Apply".

 

azharkhan_0-1656079460641.png

then create new column1

Column1= IF [Value]="X" then [Attribute] ""

 

Finally, you can create calculated table using DAX below.

 

ES Features = ADDCOLUMNS(SUMMARIZE('Table1','Table'[ES No.]),"ES Features", CALCULATE(CONCATENATEX('Table1', 'Table1'[ES Features], " ")))
 
azharkhan_1-1656079695726.png

 

This is based on the solution provided v-xicai in another thread.

 

Best Regards,

View solution in original post

2 REPLIES 2
azharkhan
Regular Visitor

This is not the perfect solution but the best I could work out so far.

 

you can select the all the columns where you need to find the value 'X', then in Query Editor unpivot these column to row data like picture below, click "Close & Apply".

 

azharkhan_0-1656079460641.png

then create new column1

Column1= IF [Value]="X" then [Attribute] ""

 

Finally, you can create calculated table using DAX below.

 

ES Features = ADDCOLUMNS(SUMMARIZE('Table1','Table'[ES No.]),"ES Features", CALCULATE(CONCATENATEX('Table1', 'Table1'[ES Features], " ")))
 
azharkhan_1-1656079695726.png

 

This is based on the solution provided v-xicai in another thread.

 

Best Regards,

azharkhan
Regular Visitor

anyone please? or I take it, it is not possible ?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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