activepivot

Use a dimension only as a slicer


Users often want to be able to filter on high cardinality dimensions such as ISIN or counterpartyID.

Is there a way to use such dimensions as slicers but block them for being used in rows / columns ?

Best regards,

Christophe


Solution

  • You can easily do it with the MDX-based web client interface ActivePivot Live.

    To do so, you need to extend the class OlapEntityToWizardExpressionConverter and rebind the interface IOlapEntityToWizardExpressionConverter to your custom class through GIN (GWT INjection). Easily doable (only one line of code):

    bind(IOlapEntityToWizardExpressionConverter.class).to(MyCustomizedOlapEntityToWizardExpressionConverter.class);
    

    Then in your class, simply override the visit(final Hierarchy hierarchy) method:

        ...
    
        if(section.equals(ROWS) || section.equals(COLUMNS)){
              if(hierarchy.getName().equals(ISIN) ||  hierarchy.getName().equals(counterpartyID))){
                   //Do something here (display a message...)
                   return;
              }
         }
    
         super.visit(hiearchy);             
    
        ...
    

    Users won't be able to put the dimension on an axis anymore.