Search code examples
powerbidaxpowerbi-desktop

Create new table from multiple tables in power BI


I have a setuation where i want to create a table from multiple table. In the new table i wrote the DAX below table 1 is Assets and table two is Costs

NewTable =
CALCULATETABLE (
SUMMARIZE(Assets,
          Assets[AssetsSKEY],
        'Costs'[Type Name],
        "Forecast", SUM ( 'Costs'[Forecast Costs]),    
    ),Assets[AssetsKEY] <> BLANK()
)

it is giving error

enter image description here

What can I do guys, Thanks


Solution

  • You have an extra , just after your SUM(...).

    You can simplify your expression by using SUMMARIZECOLUMNS:

    NewTable =
      SUMMARIZECOLUMNS(
        Assets[AssetsSKEY],
        'Costs'[Type Name],
        "Forecast", SUM('Costs'[Forecast Costs])
      )