Forum Discussion
sfink22
7 years agoHelper I
DAX to sum column based on another table
Hello! Trying to work out the right equation to sum a column based on another table for a budget dashboard. Here is my setup: Table 1 has the budget info by period, like this: Period Budget ...
- 7 years ago
Hi sfink22
You may create calculated columns as below:
Column = SUMX ( FILTER ( 'Table 2', 'Table 2'[Period] = 'Table 1'[Period] ), 'Table 2'[Amount] )Column 2 = SUMX ( FILTER ( 'Table 1', 'Table 1'[Period] <= EARLIER ( 'Table 1'[Period] ) ), 'Table 1'[Column] )Regards,
Cherie
v-cherch-msft
7 years agoMicrosoft Employee
Hi sfink22
You may create calculated columns as below:
Column =
SUMX (
FILTER ( 'Table 2', 'Table 2'[Period] = 'Table 1'[Period] ),
'Table 2'[Amount]
)
Column 2 =
SUMX (
FILTER ( 'Table 1', 'Table 1'[Period] <= EARLIER ( 'Table 1'[Period] ) ),
'Table 1'[Column]
)
Regards,
Cherie
manojsv
6 years agoRegular Visitor
Hello All,
I have the similar requirements, but i wanted to use DAX measure to calculate the total sum (335). Can you please help me in getting desired result by using DAX measure.
Appreciate any suggestions/tips!!