@previous month
2 TopicsHow do I SUM previous month data only if there is both current data and previous month data
Hi, everyone! I'm new to the Power Tools and trying to calculate growth month over month of comparable Regions (kind of like Same Store Sales month over month) but I'm having a lot of trouble. I am working on Power Query but also testing in Power BI to see if there is a difference. So this is a sample data: Country Region ID nov/22 dez/22 jan/23 fev/23 mar/23 A 23000283 110 108 106 A 23001011 95 87 A 23002115 370 359 379 A 23002468 299 286 260 255 A 23004088 203 202 A 23004258 510 494 496 474 A 23005033 260 246 242 237 What I want to do is have the following growth rates : Country Region ID nov/22 dez/22 jan/23 fev/23 mar/23 A 23000283 -1,8% -1,9% A 23001011 -8,4% A 23002115 -3,0% A 23002468 -4,3% -9,1% -1,9% A 23004088 -0,5% A 23004258 -3,1% 0,4% -4,4% A 23005033 -5,4% -1,6% -2,1% where Growth rate = (sales)/(previous month sales)-1 but only if there are both month sales and previous month sales. And a Total for the country would be: Country nov/22 dez/22 jan/23 fev/23 mar/23 A -3,8% -2,6% -3,1% Only adding Regions where there where sales in both the Month and Previous Month, so the growht in Jan would be from regions 23002115 23002468 23004258 23005033 and not include region 23000283. This link has an Excel file with formulas, a PBI file with the data and the csv files. https://we.tl/t-QDlhXnKn3N thanks in advance!Solved1.1KViews0likes4CommentsCalculate previous month sales date wise
Hi Team, Previously, thanks for help. I have to calculate previous month sales but in day wise. For example, if today's date is 29th June 2022 then previous month sales come only 1st May 2022 to 29th May 2022. I have used the below formula: Previous month sales = CALCULATE(SUM(tableA[Sales]), DATEADD(DATESMTD("calcnder'[date]), -1, MONTH)) But, this formula is showing till 31-may-2022 sales. Please help me on this Thanks Shipra1.4KViews0likes2Comments