Forum Discussion
How to create a clustered column chart with sum from multiple datasets
- 7 years ago
Hi,
Ideally you should append the two datasets (Give a name to this appended dataset as Data). Ensure that there is column in the Appended dataset which says "Budget" or "Actual" to identify the information in that row. Then create a Calendar Table and build a relationship from the Date column of the appended dataset to the Date column of the Calendar Table. In the Calendar Table, extract Year and Month by using the following calculated column formulas: Year = Year(Calendar[Date]) and Month = FORMAT(Calendar[Date],"mmmm").
Write these measures
Actual = CALCULATE(SUM(Data[Amount]),Data[Type]="Actual")
Budget = CALCULATE(SUM(Data[Amount]),Data[Type]="Budget")
Hope this helps.
Hi,
Ideally you should append the two datasets (Give a name to this appended dataset as Data). Ensure that there is column in the Appended dataset which says "Budget" or "Actual" to identify the information in that row. Then create a Calendar Table and build a relationship from the Date column of the appended dataset to the Date column of the Calendar Table. In the Calendar Table, extract Year and Month by using the following calculated column formulas: Year = Year(Calendar[Date]) and Month = FORMAT(Calendar[Date],"mmmm").
Write these measures
Actual = CALCULATE(SUM(Data[Amount]),Data[Type]="Actual")
Budget = CALCULATE(SUM(Data[Amount]),Data[Type]="Budget")
Hope this helps.