Forum Discussion
Ray
10 years agoRegular Visitor
Rolling 3 months
Hi there, I'm struggling to add a certain condition in power bi that returns financial fegures for only a certain months. I want to get the financial graphs for the last 3 months from the system date...
Greg_Deckler
10 years agoCommunity Champion
You should be able to use the rolling totals pattern or other technique from here:
http://www.daxpatterns.com/cumulative-total/
You could create a column in your data that essentially determines whether it is in the last 30 days, equals 1, between 30 and 60, 2 and between 60 and 90, 3. Then you could set your report filters for only values in that column that equal 1, 2 or 3. You would use the TODAY function like:
Last Three Months = IF(TODAY()-[Date]<=30,1,IF(TODAY()-[Date]<=60,2,IF(TODAY()-[Date]<=90,3,0)))
Then just filter out the 0's in the report or page filter area.