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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

Count ABC

I have this code:

COUNT ABC =
COUNTROWS(
FILTER(
VALUES(IMP_CUBO_VENTAS[ART_Id_Articulo]),
[ABC CLASSIFICATION]= Max(CLASE_ABC[CLASS])
)
)
What does this result give me:
stuardo_imp_0-1659568367943.png

But you see, I don't add the A's and the B's.

Please your help to fix it

Best regards

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

Please try the measure

 

COUNT ABC = 
COUNTROWS (
    FILTER ( IMP_CUBO_VENTAS, [ABC CLASSIFICATION] IN VALUES ( CLASE_ABC[CLASS] ) )
)

Or

Measure = 
SUMX (
    VALUES ( CLASE_ABC[CLASS] ),
    CALCULATE (
        COUNTROWS (
            FILTER ( IMP_CUBO_VENTAS, [ABC CLASSIFICATION] = MAX ( CLASE_ABC[CLASS] ) )
        )
    )
)

winniz_0-1660035868825.png

 

My pbix file: Count ABC.pbix

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

4 REPLIES 4
v-kkf-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

 

Has your problem been solved? If it is solved, please mark a reply which is helpful to you.

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.


Best Regards,
Winniz

Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

Please try the measure

 

COUNT ABC = 
COUNTROWS (
    FILTER ( IMP_CUBO_VENTAS, [ABC CLASSIFICATION] IN VALUES ( CLASE_ABC[CLASS] ) )
)

Or

Measure = 
SUMX (
    VALUES ( CLASE_ABC[CLASS] ),
    CALCULATE (
        COUNTROWS (
            FILTER ( IMP_CUBO_VENTAS, [ABC CLASSIFICATION] = MAX ( CLASE_ABC[CLASS] ) )
        )
    )
)

winniz_0-1660035868825.png

 

My pbix file: Count ABC.pbix

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Syndicate_Admin
Administrator
Administrator

Thanks for the reply.

But it still doesn't work.

amitchandak
Super User
Super User

@Syndicate_Admin ,

COUNT ABC =
COUNTROWS(
FILTER(
allselected(IMP_CUBO_VENTAS[ART_Id_Articulo]),
[ABC CLASSIFICATION]= Max(CLASE_ABC[CLASS])
)
)

 

or

 

COUNT ABC =
COUNTROWS(
FILTER(
allselected(IMP_CUBO_VENTAS),
[ABC CLASSIFICATION]= Max(CLASE_ABC[CLASS])
)
)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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