pivot4j icon indicating copy to clipboard operation
pivot4j copied to clipboard

dynamically filtering data

Open rdavi10471a2 opened this issue 8 years ago • 5 comments

How would you recommend filtering all cubes and reports by store name for example

SELECT NON EMPTY {[Measures].[Profit], [Measures].[Store Sales]} ON COLUMNS, 
NON EMPTY Order(Order({[Store].[USA].[CA].[San Diego], [Store].[USA].[CA].[Beverly Hills], 
[Store].[USA].[CA].[Los Angeles]}, [Measures].[Profit], DESC), [Measures].[Profit], DESC) 
ON ROWS FROM [Sales]

I am new to mdx but for this query adding the dimension to order works.. but I don't see how to do this when the report loads..

Trying to work out how to have 1 cube and filter by user org chart

rdavi10471a2 avatar Jan 10 '16 06:01 rdavi10471a2

I have fairly limited knowledge on MDX, so I'm not sure if I could be of much help in suggesting a correct query to use in that situation.

However, since Pivot4J supports basic filter and sort operations, you might want to check the result data and generated MDX first and see if would satisfy your need.

By the way, Pivot4J (and also JPivot for that matter) needs to synchronize between the user MDX and its internal query model, so when you deviate much from the generated query, chances are that it won't recognize it so fail to render the result properly.

mysticfall avatar Jan 10 '16 14:01 mysticfall

Thanks for the reply What if I played man in the middle.. can I manipulate the list of dimensions find the dimensions I want and manually filter them before the user has the chance to drag them on the form.. or before the filter form is shown deselect and remove the items I don't want...

what do you think?

RD

On Sun, Jan 10, 2016 at 8:05 AM, Xavier Cho [email protected] wrote:

I have fairly limited knowledge on MDX, so I'm not sure if I could be of much help in suggesting a correct query to use in that situation.

However, since Pivot4J supports basic filter and sort operations, you might want to check the result data and generated MDX first and see if would satisfy your need.

By the way, Pivot4J (and also JPivot for that matter) needs to synchronize between the user MDX and its internal query model, so when you deviate much from the generated query, chances are that it won't recognize it so fail to render the result properly.

— Reply to this email directly or view it on GitHub https://github.com/mysticfall/pivot4j/issues/193#issuecomment-170351730.

rdavi10471a2 avatar Jan 13 '16 05:01 rdavi10471a2

If what you want is show only predetermined selection of dimensions (dimensions themselves, not members inside them) in the cube structure panel, it can be done easily but it will require custom modifications to the source code.

In case, you are using Mondrian as your OLAP backend, I'd suggest editing the schema instead, as it would be a much easier and cleaner way to achieve the same result.

Please let me know if I understood you incorrectly, or in case you need further assistance.

mysticfall avatar Jan 13 '16 06:01 mysticfall

Close, I want to allow the users to see the entire panel but automatically filter out specific values. Much like is done with a ROLE in he Mondrain sample.

On Wed, Jan 13, 2016 at 12:13 AM, Xavier Cho [email protected] wrote:

If what you want is show only predetermined selection of dimensions (dimensions themselves, not members inside them) in the cube structure panel, it can be done easily but it will require custom modifications to the source code.

In case, you are using Mondrian as your OLAP backend, I'd suggest editing the schema instead, as it would be a much easier and cleaner way to achieve the same result.

Please let me know if I understood you incorrectly, or in case you need further assistance.

— Reply to this email directly or view it on GitHub https://github.com/mysticfall/pivot4j/issues/193#issuecomment-171180543.

rdavi10471a2 avatar Jan 13 '16 13:01 rdavi10471a2

I'm sorry but I don't currently have an old Mondrian/JPivot web application setup in my computer. So, could you please elaborate what you mean by that?

For what I understand how the role system works in Mondrian is that it is applied as a connection property, thus those dimensions of which the user does not have a proper permission to see are hidden from the start.

So if you want to expose all the dimensions at first then filter them later, then I don't see how it could be achieved by using Mondrian roles. You might be able to do so if you switch two different connections with different roles, but I doubt if it could be a practical solution.

mysticfall avatar Jan 14 '16 22:01 mysticfall