Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Ingan
Regular Visitor

Create calculated table from multiple tables with sum and group by DAX

Hi,

I have a problem that i´ve been struggling with.

I want to create a preaggregated calculated table from 1 fact table and 2 dimensions.

 

Fact

FactKeyAccountAmountCostCenterId
1351001022334
23400020066789
39322030066789
49322015066789

 

DimReport

ReportReportRowAccount
Rapport129129/* CM35100
Rapport129129/* CM34000
Rapport129129/* CM93220

 

DimCostCenter

CostCenterIdCostCenterName
22334xy
66789op

 

My desired output in calculated table is this:

 

Ingan_0-1718631845086.png

 

 

 

 

I have tried with ADDCOLUMNS and SUMMARIZE but i only manage to get columns from one dimension and sum of fact columns. I want to have columns from 2 dimensions( Report and CostCenter) and sum of fact columns.

1 ACCEPTED SOLUTION

also try this:

Table =

    SUMMARIZE(
        Fact,
        DimReport[Report],
        DimReport[Account],
        DimCostCenter[CostCenterName],
        "SumAmount", SUM(Fact[Amount])
    )

View solution in original post

3 REPLIES 3
Tutu_in_YYC
Community Champion
Community Champion

You will probably get more replies in you post this in the DAX section.
https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/bd-p/DAXCommands

Anyway, if you can access Power Query editor, using the function Group By to aggregate, and Merge to add those columns from dimension, will be easier.

Thank you so much for your reply! Yes i realize im in the wrong section 🙂 Im working with a tabular model in Visual studio so i can´t access the Power Query editor.

also try this:

Table =

    SUMMARIZE(
        Fact,
        DimReport[Report],
        DimReport[Account],
        DimCostCenter[CostCenterName],
        "SumAmount", SUM(Fact[Amount])
    )

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.