Need help pulling distinct count from another sheet
Hi. I am creating a rollup sheet using two separate directories imported onto separate sheets. Looking for Unique NPI and Unique locations.
The following formula works for the first entry, but is returning 1 for the next 3. =COUNT(DISTINCT(COLLECT({DE Location ID}, {DE Benefit Name}, "vision", {DE Client Name}, CONTAINS([Client Name]@row, @cell))))
=COUNT(DISTINCT(COLLECT({DC Location ID}, {DC Benefit Name}, "vision", {DC Client Name}, CONTAINS([Client Name]@row, @cell)))). The only difference is that the DC information is coming from the same directory but has 3 different clients. The NPI count seems to working fine.
Any suggestions?
Best Answer
-
Yes and Yes. The leading zero creates a text string instead of a number. Inconsistent data types will cause issues.
insert a new text/number column and use this as a column formula:
=[Location ID]@row + ""
Now everything will be converted to a text string for consistent data type, and you can reference this column in your cross sheet reference.
Answers
-
When you say that it has "3 different clients" do you mean that there are three options selected in a multi-select dropdown?
-
Hi Paul,
Yes, there are 3 different options.
-
What kind of data is in the {DE Location ID} range? Do some cells have numbers and other cells have text?
-
Hi Paul,
I looked at DC and DE location ID range and both have numbers only (5-7 digits).
Thanks,
Sherry
-
Paul,
One of the Location IDs in the DC data does start with 0. Could that be the issue? If so, is there a way around it?
Sherry
-
Yes and Yes. The leading zero creates a text string instead of a number. Inconsistent data types will cause issues.
insert a new text/number column and use this as a column formula:
=[Location ID]@row + ""
Now everything will be converted to a text string for consistent data type, and you can reference this column in your cross sheet reference.
-
That worked! Thank you so much!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 464 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 61 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!