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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Mohammadwazeri
Helper II
Helper II

If Item Is Available in More Than One Location Count It Once

Hi Everyone,

 

Would you please help me figure out this calculation?

I have more than one location and one Item may be available in more than one location.

 

1. I want to count the unique Item No. 

2. If one item is available in more than one location then count it one time.

3. Available Unique Count / Item No. Unique Count

 

Mohammadwazeri_0-1709241849596.png

 

Thank you!

Mohammad

4 REPLIES 4
selimovd
Super User
Super User

Hey @Mohammadwazeri ,

 

what did you try so far and where are you stuck?

 

Best regards

Denis

Hi @selimovd,

 

I did count the unique item no, but I couldn't figure out how to count if item is available in more than one location count it once.

 

Thanks,

Mohammad

Hey @Mohammadwazeri ,

 

here you go:

Unique Item No = DISTINCTCOUNT( myTable[Item No] )

 

I don't understand what you mean with "Available Unique Count".

Can you explain that?

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

Best regards
Denis

Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic

Thank you, @selimovd  for your reply.

"Available", let's think of an auto part business that has a store in every city or state in the USA. 

Every store uses the same item # (ex: 12345) for the one part (winshield whipper).  This item exist only in three store, instead of counting this three times I want to count it only one time regardless of how many items available. If it's available in one store or in ten store just count it one time.

 

Best Regards,

Mohammad 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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