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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
superpowerteam
Frequent Visitor

Counting the results of a dax measure in a table visual

Hello BI Community,

I'm about to go crazy over a little DAX problem. I'm sure someone has the solution for this.

I have created a Pareto that has material numbers on the x-axis and adds up the production times on the y-axis.

With conditional formating I have colored the 20% materials that account for 80% of the production hours (green bars).

 

BI Pareto.png

 

 

I would now like to simply count the green bars and display them in a card visual.

My first attempt was with an If Statement to mark the 20% items with an "A" in a table visual.

Pareto Material =
If ( [Pareto % 1] <= 'Pareto Threshold'[Pareto Threshold Value], "A" )

Now I just want to count the "As" (in this example there are 16 materials) and display this number in a Card Visual.

Does anyone have any ideas? Thanks in advance.

1 ACCEPTED SOLUTION
daXtreme
Solution Sage
Solution Sage

Iterate the materials (possibly using ALLSELECTED) and countx the A's...

// Something like...

[# A's] =
COUNTAX(
  VALUES( T[Material] ),
  [Pareto Material]
)

// and put this into a card...

View solution in original post

3 REPLIES 3
daXtreme
Solution Sage
Solution Sage

Iterate the materials (possibly using ALLSELECTED) and countx the A's...

// Something like...

[# A's] =
COUNTAX(
  VALUES( T[Material] ),
  [Pareto Material]
)

// and put this into a card...

You saved my day 🙂 It works perfect. Thanks 

Can you tell me how a dax measure would look like? 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.