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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
kb177
Helper II
Helper II

Month on month/ Year on Year change

Hello

 

I get data in below format from other team, I want to add MOM difference and  also yoy difference once year changes to 2023,  when I'm trying to create measure Amount column is not showing in after using Calculate function

 

YearAmount
Sep-2230000
Oct-2231000
Nov-2229000
Dec-2235000
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@kb177 , I usually prefer to create YearMonth YYYYMM or date and then join it with YearMonth/date table

 

Date = datevalues("01-"&[Year])

 

Join with date table

 

and have measure like

 

MTD Sales = CALCULATE(SUM(Sales[Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Amount]),previousmonth('Date'[Date]))

 

For more refer

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

 

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

View solution in original post

2 REPLIES 2
kb177
Helper II
Helper II

Thanks Amit It worked.

 

Can we show total difference (+/-) of Last month vs current month in card visual 

amitchandak
Super User
Super User

@kb177 , I usually prefer to create YearMonth YYYYMM or date and then join it with YearMonth/date table

 

Date = datevalues("01-"&[Year])

 

Join with date table

 

and have measure like

 

MTD Sales = CALCULATE(SUM(Sales[Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Amount]),previousmonth('Date'[Date]))

 

For more refer

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

 

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.