cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

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!!

 

Capture.JPG

 

 

 

1 ACCEPTED SOLUTION
Microsoft
Microsoft

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. Smiley Happy

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

 

Regards

View solution in original post

3 REPLIES 3
Microsoft
Microsoft

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. Smiley Happy

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

 

Regards

View solution in original post

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?

This works perfect!!  Thanks so much!!

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors