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

Contiguous error...PY and PY YTD

I know this has been addressed in other posts, but I can't seem to get this issue resolved.  I'm using the following formula:

PY = CALCULATE([Sales],DATEADD('Accounting Date'[FULL_DATE],-1,YEAR),all('Accounting Date'))

 

My data is being sliced by Sales Channel.  I have 6 sales channels in all.  The formula above works perfectly for 4 out of the 6 channels.  I get the conntiguious error on the other 2.  I'm assuming it 'might' be because we didn't have sales assigned to those two sales channels for that given date....so the formula doesn't see that date and errors out...regardless if I'm looking at day, month, or year.  I could be wrong though.  Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
blopez11 Established Member
Established Member

Re: Contiguous error...PY and PY YTD

You likely need to use a date table, relate it to your data's datekey, then use the columns from the data table in your report axis, slicers, and possibly measures

3 REPLIES 3
codyraptor Regular Visitor
Regular Visitor

Re: Contiguous error...PY and PY YTD

Just an update...I've definitely been able to locate the cause of the error.  The 2 sales channels are the smallest channels we have and they don't have sales every day...so when I toss them in the mix..dates are skipped.   I'm really struggling on this one.  Any help is greatly appreciated!!

Highlighted
blopez11 Established Member
Established Member

Re: Contiguous error...PY and PY YTD

You likely need to use a date table, relate it to your data's datekey, then use the columns from the data table in your report axis, slicers, and possibly measures

codyraptor Regular Visitor
Regular Visitor

Re: Contiguous error...PY and PY YTD

The date table was exactly it!!  Thanks!!

Helpful resources

Announcements
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

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: 321 members 3,307 guests