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

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

Reply
Anonymous
Not applicable

Display count of 3 values from 1 column for 12 data points

How's that for a confusing subject line?  😉

 

I have a table that has 12 specific data points (Attributes) I need to track.  Each data point has 3 possible values (auto, manual or blank) called Method.  I need to produce a table (matrix?) that shows each attribute name (i.e. the column names) down the left-most column, then then count of each of the three possible values in the next 3 columns (see mockup).  I cannot figure out how to get the column names to display (versus their value) nor how to display the 3 columns that count the number of possible values.  Help?

 

AttributesAutoManualBlank
Attribute 11055
Attribute 2686
Attribute 35113
1 ACCEPTED SOLUTION

hello @Anonymous 

 

it certainly helpfull with your sample data appearance.

1. unpivot your table in power query.

Irwan_0-1726013367168.png

 

2. replace value for that blank row into Blank value since you want to show them as Blank.

Irwan_1-1726013422633.png

 

4. create a measure to count

Count = COUNT('Table'[Value])
 

5. put them in matrix visual.

Irwan_2-1726013464501.png

 

another note, if you want to group "automated" and "automation" as "auto", you can replace those two value into one value.

Irwan_4-1726013742672.png

Irwan_3-1726013704668.png

 

Hope this will help.

Thank you.

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @Anonymous 

Based on your needs, I have created the following table.

vjialongymsft_0-1725932855148.png

 

 

Then you can use the following measure to get the result you want:

Measure = 
VAR _select_attr = SELECTEDVALUE('Table'[Attributes])
VAR _select_Method = SELECTEDVALUE('Table'[Method])
RETURN
CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Attributes]=_select_attr&&'Table'[Method] = _select_Method))

 

Result:

vjialongymsft_1-1725932927197.png

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

This is what the source data looks like (each column is an attribute).  Each row is a particular Class of computer systems that will be selected via a slicer (whether it's one class or multiple classes combined).

 

Ruthie09_0-1725976410824.png

 

The desired output would look like this (in this mock-up, there are 260 classes but in reality there are more):

Ruthie09_0-1725980872185.png

 

I'm grappling with 2 questions:

  • How to get the attributes (i.e. the column headers) to be listed vertically as shown in the desired output above?
  • How to produce the results of all 12 attributes based on whatever class is selected in the slicer (and do I do that in one formula or 3 different formulas (one for auto, one for manual and one for blank)?  The formula you offered was along the lines of what I'm looking for but not quite.

 

Does that help or make it more confusing?

 

hello @Anonymous 

 

it certainly helpfull with your sample data appearance.

1. unpivot your table in power query.

Irwan_0-1726013367168.png

 

2. replace value for that blank row into Blank value since you want to show them as Blank.

Irwan_1-1726013422633.png

 

4. create a measure to count

Count = COUNT('Table'[Value])
 

5. put them in matrix visual.

Irwan_2-1726013464501.png

 

another note, if you want to group "automated" and "automation" as "auto", you can replace those two value into one value.

Irwan_4-1726013742672.png

Irwan_3-1726013704668.png

 

Hope this will help.

Thank you.

Anonymous
Not applicable

Excellent!  This worked and I was able to adapt the formula to capture variations using SEARCH:

 

m_Remediation Auto Count = CALCULATE(Countrows('Overall Rollup - Remediation'),SEARCH("auto", 'Overall Rollup - Remediation'[Value],, 0)>0)
 
Thank you, Irwan!

hello @Anonymous 

 

glad it works.

 

Thank you.

Anonymous
Not applicable

Each attribute is a column which contains one of the three values (Attribute 1 method, Attribute 2 method, etc.).  Each attribute has other columns relating to it, the values of which aren't relevant here.  What I'm trying right now is to create 3 different countrows measures (one for each possible method value), that I'm guessing can somehow be used with VAR to account for each attribute????  But basically, I'm nowhere right now.

@Anonymous 

 

please share your sample data (remove confidential information).

How does "Attribute 1 method, Attribute 2 method, etc" looks like.


Thank you.

Irwan
Super User
Super User

hello @Anonymous 

 

i assumed that is your desired outcome, how does your original table look like?

Thank you.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.