cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PatrickEjlersga Frequent Visitor
Frequent Visitor

sameperiodlastyear returns total month instead to date

Hi

I'm quite new to PowerBI and i do not understand why my formula gives me a full month last year march (todays date is 10/3)

 

My formula looks like this:

Sameperiodlastyear = CALCULATE(SUM('Sellout-730'[SumOfRP_Positionswert]); SAMEPERIODLASTYEAR('Kalender 1'[Date]))
 
You can see in the table below that on the seperate days it gives me the correct sales data, but the total shows the total turnover in March.  Hope someone can help and that this is the formula i have to use - at least thats what all tutorial shows.
 
SameperiodlastyearDate
                           382.822    01.03.2019 00:00
                           394.818    02.03.2019 00:00
                           367.519    05.03.2019 00:00
                           357.034    06.03.2019 00:00
                           310.275    07.03.2019 00:00
-                              4.363    08.03.2019 00:00
                           464.177    09.03.2019 00:00
                                5.750    10.03.2019 00:00
                        7.328.280     
5 REPLIES 5

Re: sameperiodlastyear returns total month instead to date

Hi @PatrickEjlersga 

 

Can you share a pbix sample?

PatrickEjlersga Frequent Visitor
Frequent Visitor

Re: sameperiodlastyear returns total month instead to date

Hi @christianfcbmx 

 

What is a pbix sample and how do i share it?

Re: sameperiodlastyear returns total month instead to date

the .pbix is the file you are using....I want to work over what you have becasue I have the same measure in a pbix I have and when I filter by months I get the right result as total ....I wondering why you can not get it....

 

if you dont have sensitive data send me your pbix file through this website: www.wetransfer.com (very easy to use...self explanatory)

 

to this email- dominguezcampusano@gmail.com

 

Smiley Happy

Re: sameperiodlastyear returns total month instead to date

Captura.JPGCaptura2.JPG

PatrickEjlersga Frequent Visitor
Frequent Visitor

Re: sameperiodlastyear returns total month instead to date

Hi @christianfcbmx 

I have send you an excel with some powerpivot and pivot data. I have just made an example - its not the real data, but i still have the problem. It does not give me YTD, but YT full month. 

 

2019 goes from 1st jan 2019 to 9th March 2019

Same period last year should be:

1st jan 2018 to 9th of march 2018

 

Hope you can help.