Create KPI Status Indicators Using Conditional Formatting

08/30/2010

SharePoint 2010

Here is a simple and easy way to create KPI-like lists in SharePoint 2010 without requiring the need for the Enterprise edition:

Requirements:

  • Images used for indicators uploaded to SharePoint
  • Column created to store the image (Multiple lines of text / Enhanced rich text)
  • …and, of course, a SharePoint list

So, for starters, I have a project inventory list that stores the product name and amount in stock.

I have three images that I want to use as indicators:

In stock

Close to running out

Out of stock

Once I have configured my list and added the new column (Indicator), open the desired view of the list in SharePoint Designer 2010. I am using the AllItems.aspx view. Select the cell under the Indicator column and, using the ribbon UI, click the drop down on Conditional Formatting and choose Format Column:

On the screen that displays, set what condition must first be met before displaying the specific indicator. Starting with the condition for when the inventory is running low, I will select when Inventory is Less Than 150 and Greater Than 1.

Click Set Style, and set the following style changes:

Background

background-image: browse for the uploaded image and pick the appropriate image for this condition (ex. yellow.png)
background-report: no-repeat
(x) background-position: left
(y) background-position: center

Position

Height: set to image height

Layout

Visibility: visible

Click Ok and then repeat the process of creating the remainder conditions and styles. Once completed, save your view in SharePoint Designer and go back to the site to refresh the page. You should see your desired results like so:

Pretty cool, right!? Well, I thought so at least.

_____________________

Sponsors *Trusted SharePoint Ads Only!*

Packaged Enterprise Search
for SharePoint.View a quick online demo here! Surfray.com/Ontolica

Free Outlook Sidebar!
Access SharePoint from Outlook w/ harmon.ie Sidebar. Download Now!

SharePoint Migration Tools
Sharegate: No-Brainer Migration Tools for SharePoint. $375.

SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.

8 Tips to Increase SharePoint Adoption
Download Free Whitepaper

Advertisements

Subscribe

Subscribe to our RSS feed and social profiles to receive updates.

19 Comments on “Create KPI Status Indicators Using Conditional Formatting”

  1. Robert Says:

    I like it

    Am a good old fashioned IT Comms Engineer who lives in the world of hardware and network system managment but stretching myself I have decided to learn the power of SP and now I wish I had been a web dev or something all along – but am soooo far behind the knowledge levels I would like to be to develop useful content so this little tip bit was perfect for me to create some system health counters for my service status pages. I have a small problem that the List displays the colours (in my case rather than icons) according to values in one of my columns but the display only shows this when i click on the list and it appears in the seperat epage with the all views view..how do I get it to display at the site with my pretty colours?

    Reply

  2. Predrag Says:

    Hi,

    I have a similar issue. These are the steps I have performed:
    1. I created a list with an Indicator column and Value column
    2. In that list I set the conditions on Indicator column (with the indicator files in the Images gallery)
    3. Then I entered values for the Value column. The list have shown everything correctly
    4. On the home page, I have added the list as a web part and there was everything fine, except I cannot see images

    Notes:
    – I have set a correct view
    – Permissions are not a problem

    Any thoughts?

    Regards,
    Predrag

    Reply

  3. chandrika Says:

    hi,
    i have tried above process

    at any time i am getting only one icon for all the items though the condition is different

    Reply

    • danjbgroup Says:

      Did you ever get an answer on this. I have the same issue. One color no matter the condition. I have three separate conditions and coorisponding colors so it seems it should have worked. Let me know if you figured this out. THanks!

      Reply

  4. Atli Says:

    Hi,

    Pedrag and Robert, the formatting in this article is done on the ListView Web Part that the AllItems.aspx View uses. So you have to open the page that stores your ListView Web Part, just like you did with the AllItems page, and do it again 🙂

    B. regards,
    Atli

    Reply

  5. Deb Says:

    Question: I was able follow your instructions and get indicators to show up correctly on a document library using a new view called Indicator View. This works great as long as I am in the document library. When I go back to the page the library is on, the indicators disappear. The default view is set to the Indicator View. Is there a way to default the view for this document library so the Indicator view and the indicators show up when on the main page? I have done this in both SP 2007 and 2010 (Enterprise Edition). Any assistance would be appreciated. Thanks.

    Deb

    Reply

  6. Jim Says:

    Hello,

    I did a slight variation on this example where the conditional formatting was based on the user input column called “status” where they would enter Red, Yellow, or Green. Then based on their selection it would display the correct indicator icon. The only issue I am having is when I only want to display the indicator icon column and not the user inputed “status” column. The user can still edit the item and change the status using a drop down menu, but when I edit the AllItems.aspx view to only display the indicator column, the column doesn’t display the icon. It works perfectly when the “status” column is displayed in the view, but when it is hidden it won’t work. I have tried everything, but I can’t understand why this is. The field that the conditional format is based off of is not gone, its just not being displayed. Do you know why the Indicator icon will not display?

    Thank you for the help

    Jim

    Reply

  7. [--] Says:

    If I remove the inventory column from the view – the indicators/traffic lights disappear – how can I just present the indicator column ?

    Reply

  8. Bastiaan Says:

    @[–] XSLT works clientside, so the columns you base your conditional formatting on, should definitelly be available in the view. Once you delete those columns from the view, you formatting is not applied, since the operators have no conditions to match it to.

    I’ve got another question: how can I package conditional formatting? I would like that the conditional formatting is available on sites I create with PowerShell. If I export my site to WSP, there is no reference to the XSLT changes I’ve made to the view. Where are these changes stored, if it cames to XML solution packaging?

    With regards,
    Bastiaan

    Reply

  9. kendall-johns Says:

    Outstanding instruction. I’m so grateful that I may have to keep posted to your postings.

    Reply

  10. swapniljadhav Says:

    fine…its Working man!!!!

    Reply

  11. michael Says:

    Everything works fine, but when I’d like to publish differet lists in one site with a webpart, the different colours and graphics do not appeare. Do you habe any idea?

    Reply

  12. Artem Says:

    Another solution:
    http://www.sparqube.com/sharepoint-status-indicator/
    It is custom column and can be configured through SharePoint Web UI.

    Reply

  13. Thijs Deschepper (@thijsdeschepper) Says:

    Nice work! I tested this out my self, but now I have this strange error. It is no longer possible for me to edit the items in the list which uses the conditional formatting. I always get the error “The item might not longer be available”. Has anyone ever come across this issue?

    Reply

  14. Dan Dullinger Says:

    I followed the instructions and it seemed straight forward. Everything works except I only get one color no matter how many conditions I setup. So, I have one condition setup for each color. It seems like it only display the very first color / condition I setup. Any ideas?

    My setup is Red for 1-10 / Yellow for 11-50 / Green for greater than 50. My “Conditional Formatting Task” pane shows three separate styles as I believe it should. In summary basically it only seems to aknowledge the very first color / condition.

    Reply

  15. danjbgroup Says:

    Everything works with one exception. My list only shows colors / pics for the first condition I setup. It seems it ignores the other conditions. It only shows one icon / color no matter how many I enter. My Conditional Formatting task pane does show all the conditions I setup so it seems it just won’t see past the first condtion. My list data in combination with the conditions I setup should be working it seems. Any ideas?

    Reply

Trackbacks/Pingbacks

  1. SharePoint 2010: Recopilatorio de enlaces interesantes (XI)! « Pasión por la tecnología… - 09/01/2010

    […] Create KPI Status Indicators Using Conditional Formatting […]

  2. SharePoint 2010: Recopilatorio de enlaces interesantes (XI)! - Blog del CIIN - 09/01/2010

    […] Create KPI Status Indicators Using Conditional Formatting […]

  3. Create KPI Status Indicators Using Conditional Formatting | dtsharepoint - 07/07/2014

    […] Credit : https://sharepointadam.com/2010/08/30/create-kpi-status-indicators-using-conditional-formatting/ […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: