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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
A9kurs
Frequent Visitor

Need help to show Count from multiple columns.

Hi Everyone,

 

I need your help ,I am trying to show Distinct names and there count in Visualisation table . 

Task is to show names and there count from three columns, It is possible name appears in all three column then count will be 3. If its blank then Ignore. 

 As shown in below example:

This is how my data looks like.

Name 1Count Name 1Name 2Count Name 2Name 3Count Name 3 
Abc Def1Fgh1 
Def Fgh1Abc1 
Abc1Abc1Abc1 
def1Abc Xyz1 
Ghi1Def GhI1 

 

I am trying to show names and there count of null as shown in below table.

NameCount
Abc4
Def2
Ghi2
Xyz1

 

I tried Unpivot but it didnt pick value from other columns.

Thanks for your help.

1 REPLY 1
MAwwad
Solution Sage
Solution Sage

To show the count of distinct names from three columns, you can use the Power Query Editor in Excel. Here are the steps to achieve this:

  1. Select the three columns that contain the names and their corresponding counts.
  2. Go to the "Transform" tab in the Power Query Editor and select "Unpivot Columns".
  3. In the "Unpivot Columns" dialog box, select only the columns that contain the names and their corresponding counts, and click "OK".
  4. Rename the "Attribute" column to "Name" and the "Value" column to "Count".
  5. Remove any unnecessary columns.
  6. In the "Home" tab, click on "Close & Load To".
  7. In the "Import Data" dialog box, choose "Only Create Connection" and then click "OK".
  8. In the Excel worksheet, go to the "Data" tab and click on "Queries & Connections" to open the "Workbook Connections" dialog box.
  9. Right-click on the connection that you just created and select "Load To...".
  10. In the "Load To" dialog box, choose "PivotTable Report" and then click "OK".
  11. In the "Create PivotTable" dialog box, select the range of the data and choose where you want the PivotTable to be located, and then click "OK".
  12. In the PivotTable Fields pane, drag the "Name" field to the Rows area and the "Count" field to the Values area.
  13. In the "Value Field Settings" dialog box, select "Distinct Count" as the calculation type, and then click "OK".

By following these steps, you should be able to show the distinct names and their counts from the three columns.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors