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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Previous month problem

I want previous month data, but when i use dax like dateadd to go to previous month then it shows data of dec in front of jan. i want to show blank. how to achieve this.

2 REPLIES 2
Anonymous
Not applicable

Hi, amit i am attaching a screenshot of a table in which i have created  previous month sales (PM sales) and in the table when i want that sales in front of each month then in front of jan by default it shows sales of dec. Is it possible through dax or any other way that it shows blank in front of jan. SS.png

amitchandak
Super User
Super User

@Anonymous , means do you want previous month with in a year ?

use offset

Previous Month in Year = CALCULATE([Net],OFFSET(-1, ALL('Date'[Month Year sort],'Date'[Month Year],'Date'[Year],'Date'[Qtr Year]),ORDERBY('Date'[Month Year sort]),KEEP,PARTITIONBY('Date'[Year])))

 

https://medium.com/microsoft-power-bi/power-bi-offset-function-84177cc2cafd

 

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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