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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jlarques
Resolver II
Resolver II

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.