Hi there!
If I’m understanding correctly, you can achieve this using rollup fields. The following assumes you have a table called dPosts] with fields {Publisher}, {Date}, and {Share Count}; as well as a table of fPublishers].
First, you’ll want to add a formula field to your oPosts] table that shows only today’s share counts. Call it {Today’s Share Counts} and use the formula…
IF(IS_SAME(TODAY(), {Date}), {Share Count})
Next, on your table of Publishers], add a rollup field that points at {Today’s Share Count} on the uPosts] table. Let’s say you call it {Today’s Highest Shares}. Use the formula:
MAX(values)
Next, create a new rollup field on your pPosts] table that points at {Today’s Highest Shares} on the sPublishers] table. Call it something like {Today’s Most Shared Post}, and use the formula:
IF(MAX(values) = {Today's Share Counts}, {Post Name})
This will give you the name of the post with the most shares today.
Finally, add a rollup field to your oPublishers] table, that looks at {Today’s Most Shared Post} on the tPosts] table. The following formula will give you today’s most shared post, and will trim it to just the first one it finds if more than one post happen to have the same amount of shares.
IF(FIND(",", ARRAYJOIN(ARRAYCOMPACT(values))), LEFT(ARRAYJOIN(ARRAYCOMPACT(values)), FIND(",", ARRAYJOIN(ARRAYCOMPACT(values))) - 1), ARRAYJOIN(ARRAYCOMPACT(values)))
You may have to switch some things around depending on your base set-up, but I hope that helps to get you started!
Hi there!
If I’m understanding correctly, you can achieve this using rollup fields. The following assumes you have a table called dPosts] with fields {Publisher}, {Date}, and {Share Count}; as well as a table of fPublishers].
First, you’ll want to add a formula field to your oPosts] table that shows only today’s share counts. Call it {Today’s Share Counts} and use the formula…
IF(IS_SAME(TODAY(), {Date}), {Share Count})
Next, on your table of Publishers], add a rollup field that points at {Today’s Share Count} on the uPosts] table. Let’s say you call it {Today’s Highest Shares}. Use the formula:
MAX(values)
Next, create a new rollup field on your pPosts] table that points at {Today’s Highest Shares} on the sPublishers] table. Call it something like {Today’s Most Shared Post}, and use the formula:
IF(MAX(values) = {Today's Share Counts}, {Post Name})
This will give you the name of the post with the most shares today.
Finally, add a rollup field to your oPublishers] table, that looks at {Today’s Most Shared Post} on the tPosts] table. The following formula will give you today’s most shared post, and will trim it to just the first one it finds if more than one post happen to have the same amount of shares.
IF(FIND(",", ARRAYJOIN(ARRAYCOMPACT(values))), LEFT(ARRAYJOIN(ARRAYCOMPACT(values)), FIND(",", ARRAYJOIN(ARRAYCOMPACT(values))) - 1), ARRAYJOIN(ARRAYCOMPACT(values)))
You may have to switch some things around depending on your base set-up, but I hope that helps to get you started!
I just wanted to provide an update. This solution worked beautifully. Thank you!
I just wanted to provide an update. This solution worked beautifully. Thank you!
Yay! You are entirely welcome, and thank you for the update!