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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Handyy
New Member

Matrix about counting how many specific values in column

Hello,

 

I'm trying to create a Matrix from data that has specific values of 5,2,1,0 and would like to show how many of those values are in each, but no matter how I try to put the columns in the Matrix I can't figure it out.

 

The data is as follows (will continue on to be at least 500 lines of numbers):

Untitled1.png

 

And the Matrix I'm trying to create should look like this:

Untitled2.png

 

Any help is appreciated!

1 ACCEPTED SOLUTION
bhelou
Responsive Resident
Responsive Resident

Dear , 
Attached the file i created  , there are the steps you should do in power queries : 

1- You need to Unpivot the table 
2- Duplicate the new table created 
3- remove the columns and make the Distinct column as unique ( remove duplicates ) 
4- Relationshim ( one to many ) 
5-in Matrix table just drag and drop the values and make it as count .

Hope this helps , accept as a solution . Thanks 

 https://drive.google.com/drive/folders/1q_JILK5iNnwDkNU_uiS2n4nO16KthG2b?usp=sharing 


View solution in original post

5 REPLIES 5
bhelou
Responsive Resident
Responsive Resident

Dear , 
Attached the file i created  , there are the steps you should do in power queries : 

1- You need to Unpivot the table 
2- Duplicate the new table created 
3- remove the columns and make the Distinct column as unique ( remove duplicates ) 
4- Relationshim ( one to many ) 
5-in Matrix table just drag and drop the values and make it as count .

Hope this helps , accept as a solution . Thanks 

 https://drive.google.com/drive/folders/1q_JILK5iNnwDkNU_uiS2n4nO16KthG2b?usp=sharing 


bhelou
Responsive Resident
Responsive Resident

111.png

bhelou_0-1678950883903.pngbhelou_1-1678950893666.png

 

Thank you, unpivoting the column was the thing I didn't realize!

rajulshah
Super User
Super User

@Handyy ,

 

Please unpivot the columns and plot in the matrix as follows and you'll get the desired result:

rajulshah_0-1678950501121.png

Please let me know if this didn't help.

Thank you, unpivoting the column was the thing I didn't realize!

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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