Search code examples
spotfiretibcospotfire-analyst

Spotfire - Create a KPI based on a Calculated column condition


I have a table like so:

          Project           Task                  Completion     

           P1              Scheduling             20/01/2021

           P1              Filing                 19/01/2021  

           P2              Admin                     

           P2              Safety                 19/01/2021

In this table Project P1 is complete, as both tasks have completion dates. P2 is not complete as only one task has a completion date. I want to create a KPI that shows the number of completed projects, which in this case would be 1. ie. Show the number of projects with 100% completion.

Any help would be greatly appreciated. Thanks in advance.


Solution

  • see my answer on TIBCO Community

    https://community.tibco.com/questions/i-want-create-kpi-based-calculated-column-condition

    Calculate column [Incomplete] as:

    case when [Completion] is null then [Project] end

    The value of KPI is:

    UniqueCount([Project]) - UniqueCount([Incomplete])