Forum Discussion
Calculated Table for Month over Month Changes
- 7 years ago
This is likely a workable solution, unfortunately I didn't realize you needed my complete data set as these monthly expenditures are the result of a combination of several expenditure items. When I tried this equation, the column that matched was included several times for the different items.
I was able to achieve my desired result with the following DAX:
TotalRev2 =VAR CumRev =CALCULATE([Sum Rev Rec.], FILTER(ALL(Revenues), Revenues[MonthNUM]=MAX(Revenues[MonthNUM])-1))VAR CurRev= [Sum Rev Rec.]RETURN(CurRev-CumRev)
Would depend on your data and your calculations. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
- bw703167 years agoHelper V
Thanks for responding! I would simply like the difference or the month's total sales by month, and not a cummulative figure. For example, I am currently getting the following output:
Revenues Received MONTH $9,061,289.66 11 $8,924,656.07 10 $7,099,541.62 9 $5,301,671.96 8 $3,804,197.98 7
What I would Like is:Revenues Received MONTH $136,633 11 $1,825,114.45 10 $1,797,870 9 $1,497,474 8 $3,804,197 7
The ACTUAL Sales by Month and not a cummlative total- v-yuta-msft7 years agoCommunity Support
Hi bw70316,
To achieve your requirement, you can create a calculate column using DAX formula below:
Column = VAR Previous_Month_Revenues = CALCULATE(MAX(Table1[Revenues Received]), FILTER(Table1, Table1[MONTH] = EARLIEST(Table1[MONTH]) - 1)) RETURN Table1[Revenues Received] - Previous_Month_Revenues
Regards,
Jimmy Tao
- bw703167 years agoHelper V
This is likely a workable solution, unfortunately I didn't realize you needed my complete data set as these monthly expenditures are the result of a combination of several expenditure items. When I tried this equation, the column that matched was included several times for the different items.
I was able to achieve my desired result with the following DAX:
TotalRev2 =VAR CumRev =CALCULATE([Sum Rev Rec.], FILTER(ALL(Revenues), Revenues[MonthNUM]=MAX(Revenues[MonthNUM])-1))VAR CurRev= [Sum Rev Rec.]RETURN(CurRev-CumRev)