Forum Discussion
Sum value and running total based on unique id from another table
- 9 years ago
- 9 years ago
What a simple solution that works so well! Using 'RELATEDTABLE' worked to access the 'value' info from another table. For posterity, the sample code on the linked page is:
DimDate[OrderSales] = SUMX ( RELATEDTABLE( FactInternetSales ), FactInternetSales[SalesAmount] )where '[OrderSales]' was replaced by a new column name in my new table, 'FactInternetSales' was replaced by my old table name, and '[SalesAmount]' was the column in the old table that held the values I was interested in collating. To add a running total, I used info from this link: https://community.powerbi.com/t5/Desktop/Cumulative-Total/td-p/43115.
What a simple solution that works so well! Using 'RELATEDTABLE' worked to access the 'value' info from another table. For posterity, the sample code on the linked page is:
DimDate[OrderSales] =
SUMX (
RELATEDTABLE( FactInternetSales ),
FactInternetSales[SalesAmount]
)where '[OrderSales]' was replaced by a new column name in my new table, 'FactInternetSales' was replaced by my old table name, and '[SalesAmount]' was the column in the old table that held the values I was interested in collating. To add a running total, I used info from this link: https://community.powerbi.com/t5/Desktop/Cumulative-Total/td-p/43115.