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

Count across 5 columns for same values

Hi

 

my excel data has 5 columns that contain 3 common values. (Surgery/Seles/Leding team) or are empty

 

Capture2.PNG

 

My Graph set up:

  • Axis - Hospital spec 1
  • Value - count of name

-say (Surgery/Seles/Leding team) is respectively D, I, L

data.PNG

 

 

Now how can I add remaining 4 columns to the graph to get total across all 5 surgeries ? It does not work by default

Beside there are nulls that i want to filter out. That is easy for 1 column but not sure how it would be when there is 5.

Excluding rows from one column that are null also deleate filled ones from the other . Look at the excel data above.

 

I tried play with query editor:

- pivot  reduced number of categories (Surgery/Seles/Leding team) to just 1 - not sure why

- Transpose - gives me thousand name columns

 

I was thinking of getting total count for each column per category. (would need not count nulls) but how I get it back to graph above?

 

Any idea ?

 

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@Anonymous 

 

Hi, In Query Editor try this:

 

-Select the columns with Hospital Spec (1 to 5)

-Transform - Unpivot Columns

-Filter No Blanks Columns in This New Column

 

Regards

 

Victor




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

@Anonymous 

 

Hi, In Query Editor try this:

 

-Select the columns with Hospital Spec (1 to 5)

-Transform - Unpivot Columns

-Filter No Blanks Columns in This New Column

 

Regards

 

Victor




Lima - Peru
Anonymous
Not applicable

Magic 🙂 Works like a charm 

 

Thank you so much

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.