Forum Discussion
Help creating a 'delta' chart
- 9 years ago
Hi there,
Happy to help. You should be able to write a DAX Measure to do a comparison of the two values and put that on a chart in Power BI Desktop by Month. Queries look something like below:
DAX Measure for Buy:
Bought = CALCULATE ( SUM ( [Buy] ), TableName[Sold] = "No", TableName[BoughtMonth] = "Month Criteria" )DAX Measure for Sell:
Sold = CALCULATE ( SUM ( [Sold] ), TableName[Sold] = "Yes", TableName[BoughtMonth] = "Month Criteria" )DAX Comparison Measure:
Delta Comparison = [Bought] - [Sold]
I'm not sure what your "Month Criteria" is so I put that in as a placeholder for whatever value would need to go there for your first two measures. Hope this helps!
Reid Havens - Principal Consultant
PowerPivotPro
Hi there,
Happy to help. You should be able to write a DAX Measure to do a comparison of the two values and put that on a chart in Power BI Desktop by Month. Queries look something like below:
DAX Measure for Buy:
Bought =
CALCULATE (
SUM ( [Buy] ),
TableName[Sold] = "No",
TableName[BoughtMonth] = "Month Criteria"
)DAX Measure for Sell:
Sold =
CALCULATE (
SUM ( [Sold] ),
TableName[Sold] = "Yes",
TableName[BoughtMonth] = "Month Criteria"
)DAX Comparison Measure:
Delta Comparison = [Bought] - [Sold]
I'm not sure what your "Month Criteria" is so I put that in as a placeholder for whatever value would need to go there for your first two measures. Hope this helps!
Reid Havens - Principal Consultant
PowerPivotPro