Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

SUMMARIZE using column from another table

Hi,

 

I am trying to summarize a table across Regions and Categories for the amont of Spend, but then I also want to add another column to the grouping for the 'Asset' which comes from a table linked to my 'Visibility Data - All Regions' table.

 

How would I best go about doing this? I was hoping I could somehow use the RELATED function but having no luck.

 

Below is my current table without Asset added in.

 

SUMMARIZE('Visibility Data - All Regions',
                        'Visibility Data - All Regions'[Region],
                        'Visibility Data - All Regions'[Group],
                        'Visibility Data - All Regions'[Category],
                        'Visibility Data - All Regions'[Sub Category],
                        "Revised Spend (USD)",
                        sum('Visibility Data - All Regions'[Revised Spend (USD)])
                         )

 

Thanks,

TG

 

  • Anonymous

     

    If that other table with Asset column is on the side of the relationship, then you can simply add it as GROUPING Column

     

    =
    SUMMARIZE (
        'Visibility Data - All Regions',
        'Visibility Data - All Regions'[Region],
        'Visibility Data - All Regions'[Group],
        'Visibility Data - All Regions'[Category],
        'Visibility Data - All Regions'[Sub Category],
        OtherTableName[AssetColumn],
        "Revised Spend (USD)", SUM ( 'Visibility Data - All Regions'[Revised Spend (USD)] )
    )
    

7 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    Anonymous

     

    If that other table with Asset column is on the side of the relationship, then you can simply add it as GROUPING Column

     

    =
    SUMMARIZE (
        'Visibility Data - All Regions',
        'Visibility Data - All Regions'[Region],
        'Visibility Data - All Regions'[Group],
        'Visibility Data - All Regions'[Category],
        'Visibility Data - All Regions'[Sub Category],
        OtherTableName[AssetColumn],
        "Revised Spend (USD)", SUM ( 'Visibility Data - All Regions'[Revised Spend (USD)] )
    )
    
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Zubair,

       

      Thanks for the quick response but I tried that and I get the issue "The column 'Facility / Asset Name' specified in the 'SUMMARIZE' function was not found in the input table."

       

      FYI - the data already being summarized is linked to the table containing Facility / Asset Name but on another column.

       

      Any ideas?

       

      TG