Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
91 | |
88 | |
35 | |
35 |
User | Count |
---|---|
153 | |
99 | |
82 | |
63 | |
54 |