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! Request now

Reply
FM
New Member

Dax to produce distinct count of comments (12 comment fields) per supplier across all raters

Hello PBI Community,

I have a supplier rating system that allows a rater to enter comments in 12 fields.  My aim is to have a distinct count of comments per supplier across all raters.  I have had difficulty with a dax expression that will provide this distinct count.  Note:  The comments fields are not mandatory, so the count will vary by each rater for each supplier.

Table below reduced to 3 columns for this example.

 
1 REPLY 1
edhans
Super User
Super User

There was nothing attached, but you should unpivot those fields in Power Query so there is one comment field and it will have a common supplier code rather than one supplier code with 12 fields.

 

  1. Load your data into Power Query - or it is already there.
  2. Right-click on the Supplier field and select "unpivot other columns"
  3. Rename the "Attribute" and "Value" columns as desired.

 

It will look like this, which DAX can easiliy handle as it is tabular.

 

20191219 13_52_00-Book1 - Excel.png



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors