Database reference - Adventure Works DW

Kpi - Product Gross Profit Margin

KPI properties

namevalue
nameProduct Gross Profit Margin 
descriptionTotal profit earned as a percentage of sales. 
idKPI 
display folderFinancial Perspective\Maintain Overall Margins 
associated measure group idSales Summary 
trend graphicStatus Arrow - Ascending 
status graphicCylinder 

Value

[Measures].[Gross Profit Margin]

Goal

Case
    When [Product].[Category].CurrentMember Is [Product].[Category].[Accessories]
    Then .40                 
    When [Product].[Category].CurrentMember Is [Product].[Category].[Bikes]
    Then .12                
    When [Product].[Category].CurrentMember Is [Product].[Category].[Clothing]
    Then .20
    When [Product].[Category].CurrentMember Is [Product].[Category].[Components]
    Then .10
    Else .12            
End

Status

Case
    When KpiValue( "Product Gross Profit Margin" ) / 
         KpiGoal ( "Product Gross Profit Margin" ) >= .90
    Then 1
    When KpiValue( "Product Gross Profit Margin" ) / 
         KpiGoal ( "Product Gross Profit Margin" ) <  .90
         And 
         KpiValue( "Product Gross Profit Margin" ) / 
         KpiGoal ( "Product Gross Profit Margin" ) >= .80
    Then 0
    Else -1
End

Trend

Case
    When IsEmpty
         (
           ParallelPeriod
           (
             [Date].[Fiscal].[Fiscal Year],
             1,
             [Date].[Fiscal].CurrentMember
           )
         )
    Then 0  
    When VBA!Abs
         (
          ( 
            KpiValue( "Product Gross Profit Margin" ) 
            - 
            (
              KpiValue( "Product Gross Profit Margin" ),
              ParallelPeriod
              ( 
                [Date].[Fiscal].[Fiscal Year],
                1,
                [Date].[Fiscal].CurrentMember
              )
            )
          ) 
          /
          (
            KpiValue( "Product Gross Profit Margin" ),
            ParallelPeriod
            ( 
              [Date].[Fiscal].[Fiscal Year],
              1,
              [Date].[Fiscal].CurrentMember
            )
          )  
         ) <=.02
    Then 0
    When ( 
           KpiValue( "Product Gross Profit Margin" ) 
           - 
           (
             KpiValue( "Product Gross Profit Margin" ),
             ParallelPeriod
             ( 
               [Date].[Fiscal].[Fiscal Year],
               1,
               [Date].[Fiscal].CurrentMember
             )
           ) 
         )
         /
         (
           KpiValue( "Product Gross Profit Margin" ),
           ParallelPeriod
           ( 
             [Date].[Fiscal].[Fiscal Year],
             1,
             [Date].[Fiscal].CurrentMember
           )
         ) >.02
    Then 1
    Else -1
End



Documentation generated by SqlSpec