Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
dentonblake
Helper II
Helper II

Percentage Change over Last Month - Can't Pull Last Month's Sales Figures

Not pulling Last Month's sales in order to calculate %'age change (or variance)

 

 Three Measures:

1.) Current Month = TOTALMTD(Sum(TABC[total_receipts]), TABC[obligation_end_date_yyyymmdd],ALL(TABC[obligation_end_date_yyyymmdd]))

 

2.) Previous Month = CALCULATE(TABC[Current Month],DATEADD(TABC[obligation_end_date_yyyymmdd], -1, Month))

 

3.) Percentage Change = (TABC[Current Month]-TABC[Previous Month])/if(isblank(TABC[Previous Month]),TABC[Current Month],TABC[Previous Month])

 

Table Example:

Restaurant Name   Obligation End Date Current Month     Previous Month

Restaurant 1          2017   November      $2,000

Restaurant 1          2017   October          $2,200

Restaurant 2          2017   November      $3,500   

Etc...

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

 

Share the link from where i can download your file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi, dentonblake

 

try

 

SLI_VOLUME = SUM(ft_SELLIN[QUANTIDADE]))

 

xMonthActual_SLI = TOTALMTD([SLI_VOLUME];dm_CALENDAR[Date])

 

xMonthPreviousToDate_SLI = TOTALMTD([SLI_VOLUME];DATESMTD(DATEADD(dm_CALENDAR[Date];-1;YEAR)))

 

xPercent_MTDActualvsLastYear = IFERROR( DIVIDE([xMonthActual_SLI];[xMonthPreviousToDate_SLI];0);0)

Thank you.

 

Do I need to create a Calendar table?  If so, what is the relationship between the two tables?

YES! you Do I need to create a Calendar table.


The relationship between the two tables is dm_CALENDAR[Date] with TABC[obligation_end_date_yyyymmdd] or another field that relates the sales date.

 

Whenever you use KPIs with respect to time, you should create a CALENDAR table. With it you can create other time-related KPIs like YTD, YTG, YoY MTD and others.

 

dentonblake
Helper II
Helper II

Screenshot:

 

Data_Screenshot.JPG

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.