The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 |
---|---|
14 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
28 | |
19 | |
14 | |
8 | |
5 |