cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pastrupgaard Regular Visitor
Regular Visitor

problem with sameperiodlastyear

Hi guys

 

I've created YTD in the following period 01/01 --> 10/27 with the following formula, but I'm having trouble with incorporating the sameperiodlastyear formula in it:

 

Actual YTD ($) =  TOTALYTD (sum(f_sales[Actual ($)]) ; d_time[calender_date] ; DATESBETWEEN(d_time[calender_date] ; "01/01";"10/27"))

 

I've also postet a picture, since it's easier to see

qm.PNG


I appreciate any ideas of how to get the same periodlastyear

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Pastrupgaard Regular Visitor
Regular Visitor

Re: problem with sameperiodlastyear

I got it to work with Calculate instead of TOTALYTD. Not sure what the difference is, but it works Smiley Happyqm.PNG

 

Thanks for the help

 

5 REPLIES 5
Super User
Super User

Re: problem with sameperiodlastyear

Hi @Pastrupgaard

 

Try wrapping Datesbetween with sameperiodlastyear

 

SAMEPERIODLASTYEAR (DATESBETWEEN (_________))
Highlighted
Pastrupgaard Regular Visitor
Regular Visitor

Re: problem with sameperiodlastyear

Hi @Zubair_Muhammad

 

For some reason. it's not possible to have both the sameperiodlastyear and datesbetween in the same formula Smiley Sad

 

qm.PNG

 

Br
Pastrupgaard

Super User
Super User

Re: problem with sameperiodlastyear

@Pastrupgaard

 

Remove the last bracket please

 

I see a Red ")" in the image you posted

Pastrupgaard Regular Visitor
Regular Visitor

Re: problem with sameperiodlastyear

Hi @Zubair_Muhammad

 

My bad Smiley Happy

 

I've corrected the formula, but there is no data output... I've recreated the data with a stupid workaround (so i know the data is there) and now i'm trying to make it smarter with this formula.

 

qm.PNG

 

Any smart ideas?

Br
Pastrupgaard

Pastrupgaard Regular Visitor
Regular Visitor

Re: problem with sameperiodlastyear

I got it to work with Calculate instead of TOTALYTD. Not sure what the difference is, but it works Smiley Happyqm.PNG

 

Thanks for the help

 

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 178 members 1,837 guests
Please welcome our newest community members: