Forum Discussion

ggfac's avatar
ggfac
Copper Contributor
Mar 11, 2022
Solved

Counting repeated values

Hello, everyone!

 

I'm facing a problem that I think it's easy to solute, but I'm not able to think how can I do that.

I have this database with many repeated values because I need it for identification. And I want to count the number of items, but just once. 

For example:

IdProdProductBrandIdMatMaterial
1iPhone 13Apple45Chipset
1iPhone 13Apple46Camera
1iPhone 13Apple87Glass
1iPhone 13Apple36Screen
2Galaxy S22Samsung45Chipset
2Galaxy S22Samsung46Camera
2Galaxy S22Samsung87Glass
2Galaxy S22Samsung36Screen
3iPadApple45Chipset
3iPadApple46Camera
3iPadApple87Glass
3iPadApple36Screen

 

So I want to count how many times Apple appears in my table, but just once. In that case, it would be only two times. 

2 Replies

  • Patrick2788's avatar
    Patrick2788
    Silver Contributor

    ggfac 

    This solution presumes a repeat in the Product and Brand column constitutes a duplicate.

     

    • ggfac's avatar
      ggfac
      Copper Contributor
      It worked!
      Thank you, Patrick. You helped me a lot.

Resources