Forum Discussion
Unstack a column
- 8 years ago
Hi Anonymous,
Now you have the table as follows. Please follow the steps to get expected result.
Click "New Table" under modeling on home page, you will get two tables.Actual = SELECTCOLUMNS ( FILTER ( Table4, Table4[Source] = "Actual" ), "Date", Table4[Date], "Actual", Table4[Amount] ) Budget = SELECTCOLUMNS ( FILTER ( Table4, Table4[Source] = "Budget" ), "Date", Table4[Date], "Budget", Table4[Amount] )
Actual TableBudget Table
Then create a relationship between 'Actual' and 'Budget' table.
Finally, in create a calculated column to get actual value.Actual_value = RELATED(Actual[Actual])
You will get expected result as follows.
Best Regards,
Angelia - Anonymous8 years ago
Thank you, v-huizhn-msft! That worked! Although I discovered I could not create a relationship between the two tables since I didn't have any column that had unique values. However, by concatenating 3 columns of information, I was able to create a column in each table that had unique values that provided a 1-to-1 match.
Bruce
Hi Anonymous,
Now you have the table as follows. Please follow the steps to get expected result.
Click "New Table" under modeling on home page, you will get two tables.
Actual =
SELECTCOLUMNS (
FILTER ( Table4, Table4[Source] = "Actual" ),
"Date", Table4[Date],
"Actual", Table4[Amount]
)
Budget =
SELECTCOLUMNS (
FILTER ( Table4, Table4[Source] = "Budget" ),
"Date", Table4[Date],
"Budget", Table4[Amount]
)
Actual TableBudget Table
Then create a relationship between 'Actual' and 'Budget' table.
Finally, in create a calculated column to get actual value.
Actual_value = RELATED(Actual[Actual])
You will get expected result as follows.
Best Regards,
Angelia
Thank you, v-huizhn-msft! That worked! Although I discovered I could not create a relationship between the two tables since I didn't have any column that had unique values. However, by concatenating 3 columns of information, I was able to create a column in each table that had unique values that provided a 1-to-1 match.
Bruce