Forum Discussion
espinozan
Helper I
9 years agoCreating a 12 month rolling trend report using Calendar
Hello all, I've been trying to research the best way to create a 12 month rolling trend report in Power BI. Somehow, I can't seem to find what I'm looking for. So far, I've notived most use calcu...
- Anonymous9 years agoAah, then try something like (untested code) :
=IF([Date]<Today()-365;False();IF([Date]>Today();False();True()))
Filter column by "True".
GilbertQ
Super User
9 years agoHi espinozan
Do you perhaps have some sample data that we can look at or an image for what you are trying to achieve?
espinozan
Helper I
9 years agoI don't have an image GilbertQ, I just have the idea but im not sure if it's possible to achieve in Power BI. So I basically want to use this calendar to create a series of dates that then feed into my report. The report consists of sales revenue and expenses. Am I being clear? Not sure if that makes sense.
- Salvador9 years ago
Responsive Resident
Hi,
I'd create this column
12 month rolling=
SWITCH (
TRUE ();
Now() < calendar[date]; DATEDIFF ( NOW();calendar[date]; DAY )* -1;
Now() > calendar[date]; DATEDIFF ( calendar[date]; Now(); DAY );
0)
Then as a filter, apply "is greater or equal to... 365 :D