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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jlarques
Helper V
Helper V

Add records by category

Hi community,

I have another challenge. I want to add all records of the same category, but first, I need to find which category it belongs to in the description column. When I find it, then I have to add the quantity to the rigth category.

Animals by category 1.png

How can I do that?

Thanks for all your help and support.

 

José Luis 

1 ACCEPTED SOLUTION
mh2587
Super User
Super User

measure = 

                     =IF(
      SUMX(TableName,
           FIND(
                UPPER(TableName[Category]),
                UPPER(TableName[Description])
                ,,0
               )
          ) > 0,
      SUM(TableName[Quantity]),
      BLANK()
     )

 


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



View solution in original post

2 REPLIES 2
mh2587
Super User
Super User

measure = 

                     =IF(
      SUMX(TableName,
           FIND(
                UPPER(TableName[Category]),
                UPPER(TableName[Description])
                ,,0
               )
          ) > 0,
      SUM(TableName[Quantity]),
      BLANK()
     )

 


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



This is amazing! Least than 40 seconds and I have the answer from @mh2587!!

 

Thank you so much @mh2587! It works!

 

Thanks again every community member to build this amazing community!!

 

Regards,

 

 

José Luis 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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