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,
I have this excel formula that i need to convert to power bi =year2/year1 - 1
I would like to calculate the growth rate using year 2 Month 4 divided by the previous year's, previous month (year 1 month 3)
How would i write this in power bi?
Hi @pro_x ,
Assuming you have a Dates Table.
Create Measures
Sales Amount = SUMX ( Sales, Sales[Quantity] * Sales[Net Price] )
Sales Amount LY = CALCULATE(Sales[Sales Amount], SAMEPERIODLASTYEAR('Date'[Date]))
Growth = DIVIDE(Sales[Sales Amount],Sales[Sales Amount LY])
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
@pro_x , For Change % prefer divide(curr -prior,prior)
For Year and YTD refer
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Last to last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
refer to my blog
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
=
DIVIDE (
[Measure],
CALCULATE ( [Measure], SAMEPERIODLASTYEAR ( Dates[Date] ) )
)
What will you do in case of Year 2 Month 1?
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 |
---|---|
46 | |
28 | |
22 | |
12 | |
8 |
User | Count |
---|---|
75 | |
52 | |
46 | |
15 | |
12 |