Forum Discussion
Compare value from 364 days ago
The easiest way I have found to do this is by adding a day overall number, basically a unique row id 1,2,3,4,5 etc....I use this to navigate back a froward through my date range.
LY TDP =
CALCULATE (
SUM ( TDP[TDP] ),
FILTER (
ALL ( 'Date' ),
'Date'[Day Over All]
= MAX ( 'Date'[Day Over All] ) - 364
)
)
- jpt12289 years ago
Responsive Resident
Hi OpenDataLab - Are you saying bring in the day of the year for each date in the DateDim 1-365 not including a leap year?
Thanks
- OpenDataLab9 years ago
Helper II
No. Just add an identity field that keeps on going from the first day of your date dimension until the last day. e.g if your date dimension had 2 years worth of data then you would hve values from 1 through to 728.
- jpt12289 years ago
Responsive Resident
I have multiple dates for multiple customers. Im pretty new to PoweerBI. Would this be an index column of the DimDate table? This is a sample of my source table. I have transformed the Time Description into an actual date.
Time Description Geography Brand TDP Quad End 2015-Aug-16 TOTAL US - SPECIALTY GOURMET CHANNEL Company A 117 Quad End 2015-Aug-16 TOTAL US - MULO Company A 19 Quad End 2015-Aug-16 TOTAL US - NATURAL CHANNEL Company B 14 Quad End 2015-Aug-16 TOTAL US - MULO Company B 1 Quad End 2015-Aug-16 TOTAL US - SPECIALTY GOURMET CHANNEL Company C 5 Quad End 2015-Aug-16 TOTAL US - MULO Company C 2 Quad End 2015-Dec-06 TOTAL US - SPECIALTY GOURMET CHANNEL Company A 118 Quad End 2015-Dec-06 TOTAL US - MULO Company A 20 Quad End 2015-Dec-06 TOTAL US - NATURAL CHANNEL Company B 18 Quad End 2015-Dec-06 TOTAL US - MULO Company B 0 Quad End 2015-Dec-06 TOTAL US - SPECIALTY GOURMET CHANNEL Company C 5 Quad End 2015-Dec-06 TOTAL US - MULO Company C 2 Quad End 2015-Jul-19 TOTAL US - SPECIALTY GOURMET CHANNEL Company A 116 Quad End 2015-Jul-19 TOTAL US - MULO Company A 18 Quad End 2015-Jul-19 TOTAL US - NATURAL CHANNEL Company B 16 Quad End 2015-Jul-19 TOTAL US - MULO Company B 1 Quad End 2015-Jul-19 TOTAL US - SPECIALTY GOURMET CHANNEL Company C 5 Quad End 2015-Jul-19 TOTAL US - MULO Company C 2 Quad End 2015-Nov-08 TOTAL US - SPECIALTY GOURMET CHANNEL Company A 117