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 - we are trying to display month-to-month and year-to-year percentage changes in profit using Power BI. Our data is sorted per transaction, with columns for the date and profit per sale. Is there a DAX formula we can use?
The number of sales per month are in the 1,000s and are broken down to specific days, not months (although the month is included in the value).
Solved! Go to Solution.
@Anonymous ,
To be general. you can achieve Month-Total by creating a calculate column using DAX like pattern below:
Month Total = TOTALYTD(SUM(Table[Value]),Table[Date])
Then you can achieve the percentave changes every month by create another calculate column using DAX like pattern below:
Percentage Change = VAR Current_Month = MONTH ( Table[Date] ) VAR Previous_Month = Current_Month - 1 VAR Current_Month_Value = CALCULATE ( MAX ( Table[Month Total] ), FILTER ( Table, MONTH ( Table[Date] ) = Current_Month ) ) VAR Previous_Month_Value = CALCULATE ( MAX ( Table[Month Total] ), FILTER ( Table, MONTH ( Table[Date] ) = Previous_Month ) ) RETURN ( Current_Month_Value - Previous_Month_Value ) / Previous_Month_Value
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
To be general. you can achieve Month-Total by creating a calculate column using DAX like pattern below:
Month Total = TOTALYTD(SUM(Table[Value]),Table[Date])
Then you can achieve the percentave changes every month by create another calculate column using DAX like pattern below:
Percentage Change = VAR Current_Month = MONTH ( Table[Date] ) VAR Previous_Month = Current_Month - 1 VAR Current_Month_Value = CALCULATE ( MAX ( Table[Month Total] ), FILTER ( Table, MONTH ( Table[Date] ) = Current_Month ) ) VAR Previous_Month_Value = CALCULATE ( MAX ( Table[Month Total] ), FILTER ( Table, MONTH ( Table[Date] ) = Previous_Month ) ) RETURN ( Current_Month_Value - Previous_Month_Value ) / Previous_Month_Value
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |