Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all
I have a simple line graph that is looking at an average premium amount per month for the last 48 calender months (01/07/2018 - 30/06/2022)
I now need to create a second visual that tracks the year on year change in the average monthly premium. For example,
((June 2022 avg prem) / (June 2021 avg prem)) - 1
I don't know how to achieve this in a measure, hoping someone can assist.
Many thanks!
Hi @HB13 ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @HB13 ,
Please try:
Add a new column to calculate the changes:
Column =
var _a =CALCULATE(MAX('Table'[Value]),FILTER('Table',YEAR([Date])=YEAR(EARLIER('Table'[Date]))-1&&MONTH([Date])=MONTH(EARLIER('Table'[Date]))))
return IF(ISBLANK(_a),BLANK(),CALCULATE(MAX('Table'[Value]),FILTER('Table',[Date]=EARLIER('Table'[Date])))/ _a-1)
Then create a date table and create relationship between the two tables:
Apply date and the column to the line chart:
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@HB13 , Create a date table, Join with date of your date table, create MOM measure like the below examples and use that on secondary line axis
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
diff = [MTD Sales]-[last MTD Sales]
diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])
Power BI — Qtr on Qtr with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839
https://www.youtube.com/watch?v=8-TlVx7P0A0
Thank you for your response, much appreciated 😄
This helps with month on month changes but I need to calculate a Year on Year change for the (last 48) months that are being filtered for
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |