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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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).
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.
Solved! Go to Solution.
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...
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?
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
18 | |
15 | |
7 | |
5 |