Forum Discussion
Reetz
Helper II
7 years ago% change from prior month
I have a table (tbl_USA_Canada) with 3 columns. Date, Territory and % of Sales. I am trying to display the Territory with the % change of sales from the prior month and can't seem to get this to wor...
- 7 years ago
Hi,
Assuming the entries in the Date column of tbl_USA_Canada Table are proper date entries, try this
- Create a Calendar Table
- Enter these calculated column formulas in the Calendar Table - Year = YEAR(Calendar[Date]) and Month = FORMAT(Calendar[Date],"mmmm")
- Build a relationship from the Date column of the tbl_USA_Canada Table to the Date column of the Calendar Table
- In your visual, drag Year and Month from the Calendar Table
- Write these measures - Percent of Sales = SUM(Data[% of slaes]) and Percent of Sales in previous month = CALCULATE([Percent of Sales],PREVIOUSMONTH(Calendar[Date]) and Delta = IFERROR([Percent of Sales]/[Percent of Sales in previous moths]-1,BLANK())
Hope this helps.
Reetz
Helper II
7 years agoTHANK YOU!!! This worked like a charm. I struggled with this for so long and your solution was perfect!!!
Ashish_Mathur
Super User
7 years agoYou are welcome.