cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
UditJ
Helper II
Helper II

To show previous month value [Measure Value]

In the below table i need to add a column which will basically have previous months value. Example Jan - Will have Null Value , Feb - 0.18%(jans Value) , March - 0.20% (Febs Value).. So on..

Table.PNG

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @UditJ ,

 

The data for 2019 does not affect the use of PREVIOUSMONTH() functions.

You need a calendar table to connect to the main table, use the month column of the calendar table, and use

PREVIOUSMONTH('Calendar'[Date]) to return the previous months' data.

vstephenmsft_0-1669193210184.png

vstephenmsft_1-1669193248570.png

Measure = CALCULATE([CTR],PREVIOUSMONTH('Calendar'[Date]))

13.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @UditJ ,

 

The data for 2019 does not affect the use of PREVIOUSMONTH() functions.

You need a calendar table to connect to the main table, use the month column of the calendar table, and use

PREVIOUSMONTH('Calendar'[Date]) to return the previous months' data.

vstephenmsft_0-1669193210184.png

vstephenmsft_1-1669193248570.png

Measure = CALCULATE([CTR],PREVIOUSMONTH('Calendar'[Date]))

13.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@UditJ , for a selected date time intelligence and date table can help

 

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]))
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]))

 

 

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

 

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

Previousmonth function  wont work as in my data the dates are of the year 2019. Any suggestions ? 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors