How to calculate month over month change in Power BI
To calculate the month over month change in Power BI, you can use the DAX (Data Analysis Expressions) formula language. Here’s how you can do it:
- Create a new measure to calculate the total for the current month:
- Create another measure to calculate the total for the previous month:
- Create a measure to calculate the month over month change in percentage:
Total Current Month = SUM([YourMeasure])
Total Previous Month = CALCULATE(SUM([YourMeasure]), DATEADD('YourDateColumn', -1, MONTH))
Month over Month Change = (DIVIDE([Total Current Month] - [Total Previous Month], [Total Previous Month])) * 100
Let’s illustrate this with an example. Suppose you have a table called “Sales” with columns “Date” and “Revenue”. You want to calculate the month over month change in revenue.
Total Current Month = SUM(Sales[Revenue])
Total Previous Month = CALCULATE(SUM(Sales[Revenue]), DATEADD(Sales[Date], -1, MONTH))
Month over Month Change = (DIVIDE([Total Current Month] - [Total Previous Month], [Total Previous Month])) * 100
By using these measures in your Power BI report, you can visualize the month over month change in revenue.