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

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

Reply
Sarangaku
Frequent Visitor

Count items in ABC Classification

I have created ABC Classification for a report using the below measure

 

ABC Classfication = SWITCH (
    TRUE(),
    [Total Qty Cumulative %]<= 0.8, "A Class",
    [Total Qty Cumulative %] >  0.8 && [Total Qty Cumulative %]<= 0.95, "B Class",
     "C Class"
    )

This will dynamically classify products into the above classes; I need to count many items in each class and show in a clustered column chart to show that insight, Tried many ways but didn't work, please help

Sarangaku_0-1720904626395.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sarangaku 

Measure cannot be placed in the X-axis of the clustered column chart. 
You need to change ABC Classification to a calculated column.

ABC Classfication = SWITCH (
    TRUE(),
    [Total Qty Cumulative %]<= 0.8, "A Class",
    [Total Qty Cumulative %] >  0.8 && [Total Qty Cumulative %]<= 0.95, "B Class",
     "C Class"
    )

 

 

 

Best Regards,

Jayleny

 

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

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Thank you for your prompt reply! @MattAllington  @Ashish_Mathur 

Hi @Sarangaku
 

 

After calculating the categories, you can use the following dax to calculate how many products each category corresponds to.

Measure = 
VAR _calss = SELECTEDVALUE('Table'[ABC Classfication])
RETURN
CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),'Table'[ABC Classfication] = _calss))

 

 

Result:

vjialongymsft_0-1721009286759.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.

Thank you for the response, but in my case ABC Classification is a measure, not a column

Anonymous
Not applicable

Hi @Sarangaku 

Measure cannot be placed in the X-axis of the clustered column chart. 
You need to change ABC Classification to a calculated column.

ABC Classfication = SWITCH (
    TRUE(),
    [Total Qty Cumulative %]<= 0.8, "A Class",
    [Total Qty Cumulative %] >  0.8 && [Total Qty Cumulative %]<= 0.95, "B Class",
     "C Class"
    )

 

 

 

Best Regards,

Jayleny

 

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

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
MattAllington
Community Champion
Community Champion

Sorry, my bad

SUMX(productsTableName, if([Total Qty Cumulative %]<= 0.8, 1))



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.
MattAllington
Community Champion
Community Champion

Try this

   SUMX(productsTableName, [Total Qty Cumulative %]<= 0.8, 1)



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Sarangaku_0-1720909077005.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors