Skip to content
Icon sets in result...
 
Notifications
Clear all

[Solved] Icon sets in result table? Is it possible?

7 Posts
4 Users
3 Likes
2,747 Views
Avatar
Posts: 4
Customer
Topic starter
(@qsw1wpg6oem829t8ebrrh7tlyok2)
Active Member
Joined: 3 years ago

In Excel, you can use Icon sets to create the cells in this image.  Is this even possible in Analytica?

6 Replies
Avatar
Posts: 25
Moderator
(@drice)
Member
Joined: 3 years ago

How's this look?

Here is the model that produced this: 

The main work was obtaining the icon images. I did that as follows.  I created 3 constant variables, which I named Icon_for_decrease, Icon_for_increase and Icon_for_no_change.  Then I used SnagIt (a program from TechSmith) to copy the image of each arrow from the image you posted (The snip it tool built into Windows would work fine for this as well). When doing the screen grab, I selected a rubber band rectangle around one arrow in your image, and then I clicked in the Definition of one of these constants and selected Paste (Ctrl+V).  After repeating that 3 times, I had the three icon images. 

My model creates some random data for demonstration. The Cell icons are created by filling in the Cell Format Expression as follows:

 

Reply
Avatar
Posts: 4
Customer
Topic starter
(@qsw1wpg6oem829t8ebrrh7tlyok2)
Active Member
Joined: 3 years ago

Wow. I didn't expect that. Very cool. I like how your arrow shows the day's change while the number shows today's price. Perfect.

I'm sure I'm pressing my luck, but since that was possible, is it possible to put sparklines in result table cells, like this?

Reply
Avatar
Posts: 25
Moderator
(@drice)
Member
Joined: 3 years ago

I extended the previous example model to get this:

I had to add a time dimension (the index Historic_date), and I simulated some random data over a 14 day period. For the spark line, I did not use a Cell Format Expression -- instead, it is a straight image -- i.e., the result of the computation for the corresponding cell is an image -- the spark line. The expression to compute the sparkline image is just:

Sparkline(Price, Historic_date)

where Price is indexed by Stock and Historic_date.  Because this is a new variable, I had to repeat the Cell Icon expression for the new variable, and I added an IF so that it placed the icons only in the first column.

Here is the new example model:

The Sparkline here is a UDF that is included with the model. We could use a library (that someone shares with everybody) that has different sparkline types implemented as UDFs.

Reply
Avatar
Posts: 7
Customer
(@jessiesandoval)
Active Member
Joined: 3 years ago

Why does the arrow go up for Stock B?  From the sparkline, it looks like the price dropped. Shouldn't that be a down arrow?

Reply
Page 1 / 2
Share: