cancel
Showing results for
Did you mean:
Regular Visitor

## Line up PY by Weekday vs CY by Weekday

I need help with a simple format.  Below you can see that my PY and CY dates start on the same row, but last year is WED and this year is THU.  Is there a way to offset this year from last year so the Thursday's line up.  Another words..6/1/2016 Wed will show data for PY..but CY will be blank....then row for 6/2/2016 will show PY for Thu...but CY will show 6/1 data for Thu.  The dates are coming from a calendar.

Thanks!!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super Contributor

## Re: Line up PY by Weekday vs CY by Weekday

Hi @codyraptor,

The dates are coming from a calendar.

Are PY and CY calculate columns in your calendar table? If that is the case, you should be able to use the formula below to add new calculate column in your calendar table to get the offseted CY.

New PY = 'Calendar'[CY] + WEEKDAY ( 'Calendar'[CY] - WEEKDAY ( 'Calendar'[PY] ) )

Regards

3 REPLIES 3
Highlighted
Super Contributor

## Re: Line up PY by Weekday vs CY by Weekday

Hi @codyraptor,

The dates are coming from a calendar.

Are PY and CY calculate columns in your calendar table? If that is the case, you should be able to use the formula below to add new calculate column in your calendar table to get the offseted CY.

New PY = 'Calendar'[CY] + WEEKDAY ( 'Calendar'[CY] - WEEKDAY ( 'Calendar'[PY] ) )

Regards

Regular Visitor

## Re: Line up PY by Weekday vs CY by Weekday

This works perfect!!  Thanks so much!!

Regular Visitor

## Re: Line up PY by Weekday vs CY by Weekday

K...Now I'm running into another issue.  When I place my PY counts in then they do not line up with the New PY dates.  The counts are still reflecting a year ago based on the chosen date.  I've tried filtering a measure by New PY date, but I'm not able to get it to work.  Thoughts?

Announcements

#### Back to School Contest

Engage and empower students with Power BI!

#### Watch Sessions On Demand!

Continue your learning in our online communities.

#### Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

Top Ideas
Top Kudoed Authors
Users Online
Currently online: 265 members 3,002 guests
Recent signins: