Support for automatic selection of appropriate measure based on dimensions specified
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
**Intro ::**
I am working on one of the usecases with Adventureworks 2019 OLTP schema(https://akela.mendelu.cz/~jprich/vyuka/db2/AdventureWorks2008_db_diagram.pdf) as part of exploration of Cube semantic layer
**Details of the Usecase ::**
AdventureWorks Schema has SalesOrderDetail table which provides details about line total price for every product that is being sold

It also contains SalesOrderHeader table which provides details about subtotal of an order which is shipped to a particular country.

1. The business user wants to know the total sales based on bill_to_country and ship_to_country dimensions
2. The business user wants to know the total sales based on bill_to_country , ship_to_country and product dimensions
**Expectation**
For first case, **sum of subtotal** needs to be considered automatically by Cube semantic layer as measure from table (**SalesOrderHeader** ) when dimensions are bill_to_country and ship_to_country (The join path to reach to the country would be SalesOrderHeader (BillToAddressID) --> Address (AddressID) --> Address(StateProvinceID) --> StateProvince (StateProvinceID) --> StateProvince (CountryRegionCode) -> CountryRegion (CountryRegionCode))
For second case, **sum of line total** needs to be considered automatically by Cube semantic layer as measure from table (**SalesOrderDetail** ) when dimensions are bill_to_country and ship_to_country and product is used. (The join path to reach country is SalesOrderDetail(SalesOrderID) ->SalesOrderHeader (SalesOrderID) -> SalesOrderHeader (BillToAddressID) --> Address (AddressID) --> Address(StateProvinceID) --> StateProvince (StateProvinceID) --> StateProvince (CountryRegionCode) -> CountryRegion (CountryRegionCode)) and join path to reach product would be SalesOrderDetail(ProductID) --> Product.ProductID
**Question**
Can you please let me know is there any way to achieve as mentioned in the expectations above where Cube Semantic layer will automatically figure out the measure based on the dimensions used.
Contributor guide
Assessment
This issue has not been assessed yet.