cancel
Showing results for
Did you mean:
Helper IV

## Month over Month Change without Date Table

Hi,

Can you any one suggest me the best way to calculate “Month over Month Changes” for below data set?

***I do not have Data Table in current data set

Thanks

 Month Product Jan-2020 A Feb-2020 A Jan-2020 A Feb-2020 A Feb-2020 A

Month over Month Change Formula=

Var thismonth=count(‘test table’[product])
var lastmonth=
calculate(count (‘test table’[product]),
filter(all((‘test table’[product]),
(‘test table’[month]=max(‘test table’[product])-1))
Return
thismonth-lastmonth

1 ACCEPTED SOLUTION
Super User IV

@tejapowerbi123 , once you have date like this in the table and change data type to date.

Create a date table

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

You can use formula like these

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
next month Sales = CALCULATE(SUM(Sales[Sales Amount]),nextmonth('Date'[Date]))
this month =MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))
last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
previous month value = CALCULATE(sum('Table'[total hours value]),previousmonth('Date'[Date]))

diff = [MTD Sales]-[last MTD Sales]
diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])

Refer my blog and video Month on Month with or Without Time Intelligence(TI)
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e

Proud to be a Super User!

3 REPLIES 3
Super User IV

@tejapowerbi123 , Can you create one.

If you do not have a date and have the month in the above format,

You can get a date like

Date = "01-" &[Month] and join with date table and work

Refer these

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e

Proud to be a Super User!

Helper IV

Thank you so much for your suggestion,

Correct me if i am wrong,As per your suggestions

1.Need Date Table in below format

Month Number with Name & Year

01-Jan-2020
02-Feb-2020
01-Jan-2019
02-Feb-2019

Once i have date table i need to connect it with main table.

Thanks

Super User IV

@tejapowerbi123 , once you have date like this in the table and change data type to date.

Create a date table

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

You can use formula like these

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))
next month Sales = CALCULATE(SUM(Sales[Sales Amount]),nextmonth('Date'[Date]))
this month =MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))
last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
previous month value = CALCULATE(sum('Table'[total hours value]),previousmonth('Date'[Date]))

diff = [MTD Sales]-[last MTD Sales]
diff % = divide([MTD Sales]-[last MTD Sales],[last MTD Sales])

Refer my blog and video Month on Month with or Without Time Intelligence(TI)
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e

Proud to be a Super User!

Announcements