none
Can't see KPIs in the cube

    Question

  • I've just started working on SSAS recently. I apologize in advance if I really asked stupid questions.

     

    I created a cube as well as two KPIs(named KPI1 and KPI2) in SSAS.

    I wanted to create KPI by using codes,  so I tried the CREATE KPI statement in MDX and KpiCollection.Add Method using AMO.

    At the end, I printed out a few properties of the new KPIs to make sure if I created new KPIs successfully.

    Well, the properties of the new KPIs  did show up in the browser when I run the program.

    However, when I go back and examine the cube in SSAS, I didn't see any new KPIs.

    I thought there were supposed to be new KPIs in the cube after I execute the codes.

    I did a lot of research on this problem, but couldn't find the way out.

    Is there something wrong  I done?

     

    Thank you.

    Tuesday, September 07, 2010 7:02 PM

Answers

  • Hi KerKerKer,

    No - you don't have to start a new project after modifications. There are two ways of modifying a SSAS db:

    1. Online mode - directly on the SSAS server. You can do this by opening BIDS and then opening the SSAS db from the server. If you do this all modifications get deployed directly to the server and they do not get reflected in the BIDS Analysis Services solution files on disk.

    2. Offline - project based mode. If you have an Analysis Services solution in BIDS and you make modifications to it you have to deploy the changes to the server. You can make a bunch of changes, save them and then deploy them to the SSAS instance. If you do this the online version will be separate to the solution you are using in BIDS and changes get synced to the SSAS server after you deploy, overwriting whatever is there at the time.

    In you case, you seem to be working in online mode, but then expecting to be able to open the solution/project files in BIDS and see the changes there. As these will lag behind the online version of your SSAS db you have to import the online version to a blank solution, so you can get the latest server version.

    To aviod the situation you should always work in offline mode and deploy the changes to the SSAS db when you are ready with them. This way you can easily deploy the same solution to different instances of SSAS and you can check it into VSS or TFS, or any other source control system.


    Boyan Penev --- http://www.bp-msbi.com
    • Marked as answer by KerKerKer Saturday, September 11, 2010 6:53 PM
    Wednesday, September 08, 2010 3:09 AM

All replies

  • It sounds like you added the KPIs directly to the cube on the database instance and you are expecting to see them show up in your local copy in BIDS.  The copy you are looking at in BIDS is actually a local copy of the cube definition -- when you want to browse it, it will send MDX to the database to answer your queries, but the definition is all on the local side.  When you used create kpi and AMO to modify the cube definition on the server, you modified the actual database.  To get those changes into your local copy you will need to start a new VS project, in the Business Intelligence area you should see "Import SSAS 2008 Database".

    This is something you need to be careful with because if you make a change in your BIDS copy and deploy the database, you will end up overwriting the database on the server and your changes that you made directly to the cube will be gone.

    Tuesday, September 07, 2010 8:33 PM
  • Hello Justin, 

    Thank you for your reply. I tried starting a new project again and I saw the new KPIs I've created! But I can't view them in the browser.

    Does it mean that every time I make modifications in the cube, I have to start a new project in order to view the changes in the cube?

    I also found that when I start a new project, a new SSAS database is established as well. The cube inside the new SSAS database cannot be viewed. The content in the original cube stays fine though: no new KPIs. I'm so confused. 

    Thanks again.

    Tuesday, September 07, 2010 9:55 PM
  • Hi KerKerKer,

    No - you don't have to start a new project after modifications. There are two ways of modifying a SSAS db:

    1. Online mode - directly on the SSAS server. You can do this by opening BIDS and then opening the SSAS db from the server. If you do this all modifications get deployed directly to the server and they do not get reflected in the BIDS Analysis Services solution files on disk.

    2. Offline - project based mode. If you have an Analysis Services solution in BIDS and you make modifications to it you have to deploy the changes to the server. You can make a bunch of changes, save them and then deploy them to the SSAS instance. If you do this the online version will be separate to the solution you are using in BIDS and changes get synced to the SSAS server after you deploy, overwriting whatever is there at the time.

    In you case, you seem to be working in online mode, but then expecting to be able to open the solution/project files in BIDS and see the changes there. As these will lag behind the online version of your SSAS db you have to import the online version to a blank solution, so you can get the latest server version.

    To aviod the situation you should always work in offline mode and deploy the changes to the SSAS db when you are ready with them. This way you can easily deploy the same solution to different instances of SSAS and you can check it into VSS or TFS, or any other source control system.


    Boyan Penev --- http://www.bp-msbi.com
    • Marked as answer by KerKerKer Saturday, September 11, 2010 6:53 PM
    Wednesday, September 08, 2010 3:09 AM
  • Hello Boyan,

    I can view my KPIs now in the cube after making modifications! Thank you for your help!

     

    Saturday, September 11, 2010 6:53 PM