Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Why does my KPI break my dimension relationships?

$
0
0

I have a KPI which is based on a Dimension which we could call "Database".

I have another dimension which is "Database Group" - A database Group contains many databases, but all databases are specific to one group.

I have a relationship set up in the cube between "Database Group" & "database". I also have a KPI which uses dimension database in it's calculation.

If, in an Excel Powerpivot table, I display Database Group, and Database, the relationships I have defined appear correct. So I see

DB Group 1
-- DB1
-- DB2
DB Group 2
-- DB3
-- DB4
-- DB5

However, if I then add the KPI Status indicator into the PivotTable, the relationship between DB Group & Databases breaks. The summary then appears as follows:

DB Group 1
-- DB1
-- DB2
-- DB3
-- DB4
-- DB5
DB Group 2
-- DB1
-- DB2
-- DB3
-- DB4
-- DB5

Can anyone advise as to why I can't use the DB Group / DB dimensions alongside the KPI Indicators?

Thanks.

In case it's relevant, this is how my KPI is defined:

CASE WHEN [Database].[Database Name] = [Database].[Database Name].&[FLIGHTPRO] OR
          [Database].[Database Name] = [Database].[Database Name].&[ESS CONINGSBY QRA] OR
          [Database].[Database Name] = [Database].[Database Name].&[ESS LEUCHAS QRA] OR
          [Database].[Database Name] = [Database].[Database Name].&[CADAPS ORDERS] OR
          [Database].[Database Name] = [Database].[Database Name].&[CADAPS REFERENCE]
THEN 
    //If it's less than 2 Days (48HRS) old on that day then Green
    CASE WHEN KPIValue("Current_Data_Age_KPI") <= 1
        THEN 1 
    //If it's between 2 and 3 days then Amber
    WHEN KPIValue("Current_Data_Age_KPI") >= 2 AND KPIValue("Current_Data_Age_KPI") <=3
        THEN 0
    //Over 3 days is Red
    ELSE -1
    END
ELSE
    //If it's same day then Green
    CASE WHEN KPIValue("Current_Data_Age_KPI") =  0
        THEN 1 
    //If the data is 1 to 2 days old then amber
    WHEN KPIValue("Current_Data_Age_KPI") >= 1 AND KPIValue("Current_Data_Age_KPI") <= 2
        THEN 0 
    //over 2 days is red
    ELSE -1
    END
END


Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>