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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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
Super User
Super User

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.