If I have multiple ID Cards/nametags inside of a frame, is there a way to have a counter or enter a formula to see how many cards are in the frame?
We are using Lucid for a virtual staffing board, and instead of counting the nametags manually, we wanted to just drag and drop and the counter move up or down based on # of nametags inside the frame.
Also, I did search for older topics but the 2-3 I found were 1+ yrs old and did not have a solution at the time.
Thanks,
Justyn
Page 1 / 1
Hi Justyn,
I believe conditional formatting or formulas on shapes can solve your problem. Here is a gif showing how to get a text badge with a count of the shapes in the container using conditional formatting. If you want the count in the title of the frame instead, or if you have other shapes in the frame you don’t want included in the count, I can help with that too. Let me know.
Wow. This is great - I really appreciate your help.
I actually do have some shapes that I’d like to exclude - the colored tiles. The name tags are below them (cut off for privacy).
Thanks
Also, is there a way to have individual counters for multiple areas within the same frame?
Certainly! I changed the formula on the badge from =COUNT(CONTAINED) to =COUNTIF(CONTAINED, x => SHAPETYPE(x) = “LucidCardBlock”). Here is a gif where I make that update and another gif showing how I got the shape type of the shapes.
Just saw your most recent question. We can get counts for subsections by putting those in frames as well. If you don’t want them to appear to be in additional frames, we can make them appear invisible. Looks like from your use case that we can maybe leave the frame title, which would make them easier to select and align.
Hopefully this helps.
Lance, hope you’re doing well. Just had another question related to this topic. Please see the image below.
I’d like to create a rule that adds up total number of Lucid cards (indicated by yellow circle at top right), but exclude “ATTRITION” & “LEADERSHIP” frames. Do you think you could assist with this?
It’s just so we can accurately see how many people we have on-site at a glance.
Thanks so much.
This one took a bit. First, I added a property to the two frames I wanted to exclude. I called the property “Exclude” and marked each as “true”.
On the outer frame, I added the conditional formatting rule that set the badge text to
=COUNTIF(CONTAINED, x => AND(SHAPETYPE(x) = "LucidCardBlock", COUNT(MAP(CONTAINEDBY(x), y => y."Exclude" = true)) = 0))
It counts items contained in the frame if they are a “LucidCardBlock” and are not contained by any frame that has the “Exclude” property set to true. This will also work if you have frames nested in each other and add “Exclude” to the outer frame. In this example, the outer frame count is 7, and the exclude property is on the purple and pink frames in the top left.
Let me know if you have any questions or if it’s not working. And thanks for the interesting challenge!
Hi,
Thank you so much for the reply. What should the “If” parameters be? Once I have this I should be good.
You’re welcome! I just chose the formula option and entered =TRUE because I always wanted it to show up for the shapes I selected.
Lance,
Just a follow up question for this thread. I’m trying to make a smaller, separate frame that calculates how much of our workforce is gone using the total in “ATTRITION” and the total of the entire chart (both highlighted)
Any advice on how to best go about this?
Thanks again.
Since this is getting more complicated, I re-thought how we did some of the previous work. This is a whole lot of information, so here is the document where I did this work in case you want to explore it on your own.
I’m also willing to join a call if you need it. Let me know.
Instead of having a conditional formatting rule on each inner frame that counted the number of cards in the frame, I made that number a property on the frame and copied over the formula.
That makes it so the conditional formatting rule can use shape data instead of the formula.
On the outer frame, you can also create shape data that has the formula that was in the conditional formatting. And you can update the conditional formatting rule in the same way as before.
Or we can simplify the formula a bit by using the data that is now on the inner frames. This new formula takes the sum of the “Workers in category” field on all the shapes within the frame that do not have the property “Exclude”. Note that any shape within the frame that does not have the “Workers in category” field will not be included.
With all of this new data, I created a shape within the outer frame and added a few properties to it. First I got all of the attrition workers by getting the frame containing the selected shape, then getting all of the shapes contained by that shape, and getting the “Workers in category” field of any with the property “Category” set to “Attrition”. I also added the property “Category” with value “Attrition” to the attrition frame.
The other fields on the shape are much simpler.
“Available workers” is set to =CONTAINEDBY."Available Workers", which just gets the “Available Workers” field off the container the shape is in.
“Total workers” is set to =SUM(THIS."Attrition workers", THIS."Available workers").
“Workforce gone” is set to =ASPERCENT(ROUND(THIS."Attrition workers" / THIS."Total workers", 2)), which includes “ASPERCENT” and “ROUND” to make the number easily readable.
Then, the text of the shape I entered as Workforce gone =THIS.”Workforce gone”. As soon as you type “=”, the formula box should pop up, and the text in the shape will be replaced by the formula you enter. It looks like this if you click it later.
Everything worked GREAT! Thanks again for your hard work.
Hi! I’m Micah from Lucid’s community team. 👋 I thought you, and any others who might come across this topic in the future, might be interested in Lucid’s Data Trusted User Group. This group is made up of knowledgeable users who regularly analyze and visualize data in their work. As part of this group, you’ll have the opportunity to connect directly with Lucid’s product team, gain early access to beta features, and share insights about your needs, shaping the future of Lucid’s data solutions 🎉 You can learn more and request to join here. Thanks!
Reply
Create an account in the community
A Lucid account is required to interact with the community. You will be redirected to the Lucid app to create an account.