Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi folks, hope you are doing well.
I am trying to calculate the sales from 12months and the previous 12 months as I need to compare and analyze the trend month from a previous year vs another.
Thank you in advancehttps://docs.google.com/spreadsheets/d/1W2UrYHI2MCqvHQsiDfuGpyxalYLAzNiK/edit?usp=drive_link&ouid=10...
Hi,
Access Denied message. Also, please show the expected result.
Hi @clarainesgg ,
The file is protected:
But for last 12 months you can use this measure:
Sales_Last12Months =
CALCULATE(
SUM(Sales[Amount]), -- Replace with your sales column
DATESINPERIOD(
'Date'[Date], -- Replace with your date column
MAX('Date'[Date]), -- End date of the period
-12, -- Number of months back
MONTH
)
)
For Previous 12 Months Sales:
Sales_Previous12Months =
CALCULATE(
SUM(Sales[Amount]), -- Replace with your sales column
DATESINPERIOD(
'Date'[Date],
MAX('Date'[Date]) - 365, -- Adjust by one year
-12,
MONTH
)
)
Sales Trends: Absolute Difference:
Sales_Difference =
[Sales_Last12Months] - [Sales_Previous12Months]
Sales Trends: Percentage Change:
Sales_PercentageChange =
DIVIDE(
[Sales_Difference],
[Sales_Previous12Months],
0
)
Hi, thank you.
However, it is not bring the result that i want to achieve (like the picture above)
Regards,
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
56 | |
56 | |
38 | |
29 |
User | Count |
---|---|
75 | |
62 | |
45 | |
40 | |
39 |