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
rjekrej
Frequent Visitor

Problem with same periode last year

Hi everyone

 

I have fact table with some sales. The table records the sales per day. I also have a dimesion kalender table and a relationship between the two tables. The calendertable has dates into the future. I would like a dax formula the can show me the sales today 6 months ago. Can anyone help with that?

 

Sincerely

Christian

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1698870328172.png

 

Jihwan_Kim_1-1698870440022.png

 

Sales total: = 
SUM( Sales[Sales] )

 

Sales 6 months ago: =
CALCULATE ( SUM ( Sales[Sales] ), DATEADD ( 'Calendar'[Date], -6, MONTH ) )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Dangar332
Super User
Super User

HI, @rjekrej 

 

use EDATE()  function

 

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.