Forum Discussion

peterpan's avatar
peterpan
Helper I
1 year ago
Solved

Separated Two Row Headers in Matrix

I have two fact tables of FctMainSales and FctDistributorSales connected to dimDatetable and dimCustomer. Both Fact Tables have Distributor Code which is connected to dimCustomer and FctDistributorSa...
  • rohit1991's avatar
    rohit1991
    1 year ago

    Hi peterpan 

     

    Use one Matrix with Distributor then Outlet as rows and turn Stepped layout off. In the model, link DimDate and DimDistributor to both fact tables, and link DimOutlet only to FctDistributorSales. Keep Distributor subtotals on and Outlet subtotals off. Create measures that switch by level using ISINSCOPE so Outlet rows read from FctDistributorSales and Distributor and Grand Total read from FactMainSales,for example Collection A = IF(ISINSCOPE(DimOutlet[Outlet]), SUM(FctDistributorSales[CollectionA]), SUM(FactMainSales[CollectionA])); do the same for Collection B and set Total = A + B. If you want a second subheader after the first two columns, add a disconnected Band table in Columns and return values only for the matching band.