DataBrewery / cubes

[NOT MAINTAINED] Light-weight Python OLAP framework for multi-dimensional data analysis
http://cubes.databrewery.org
Other
1.49k stars 314 forks source link

measure group feature #372

Open ghost opened 8 years ago

ghost commented 8 years ago

I miss a "measure group" feacture - like SQL Server Analytics Service has.

It work like following:

Think of having a cube "Gerneral Ledger" with a measure "budget amount" and "actual amount". the budget and actual amount will be stored in two different views: fact_general_ledger_posted and fact_general_ledger_budget. For boat i will create a measure group. So the cube will look like this:

Now i want to have two budgets, so i need a new dimension "budget" where i can choose which budget is shown. This new dimension will only be linked to the measure group Budget, but not to the Posted measure group. So when I filter for f.e. budget "MyLowBudget", the filtering does only affect to the measure "Budget Amount", but not to the measure "Budget Amount".

Currently i can build a cube and link both fact tables with union:

CREATE VIEW fact_general_ledger AS
SELECT * FROM fact_general_ledger_posted
UNION ALL
SELECT * FROM fact_general_ledger_budget

But that will only work when all fact views use the same dimensions...

Here is an example what a complex cube might look (shows a lot of measure groups): Cube Matrix

Stiivi commented 7 years ago

Thank you for good specification of the useful feature. This is definitely one of those that we want to have implemented. Requires good design first.

Related feature: #273