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 want to calculte the previous month and present month sales . Also i wanted to calucate percentage change.
Kindly provide me the steps or sample pbix
Regards,
Ranganna Naik
// Assumption is you have a custom-made calendar
// that holds the required pieces of time, among others,
// months. The Date field stores datetimes and is
// the key to the table. The table is also marked
// as the Date table in the model. Each indiviual month
// has a unique MonthId that runs from 1 to the number
// of months in the calendar (not just 12, we're talking
// about different months throughout years).
[Measure PM] =
IF( HASONEVALUE( Calendar[MonthId] ),
CALCULATE(
[Measure],
DATEADD( Calendar[Date], -1, MONTH )
)
)
[Measure MoM%] =
IF( HASONEVALUE( Calendar[MonthId] ),
var __currentValue = [Measure]
var __priorMonthValue = [Measure PM]
var __delta = __currentValue - __priorMonthValue
return
divide(
__delta,
__priorMonthValue
)
)
Best
D
HI @Anonymous ,
Have a look at this article
https://powerbi.tips/2016/07/measures-month-to-month-percent-change/
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
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 |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
46 | |
39 | |
19 | |
19 |