Forum Discussion
Previous Period Calculation and Composite Model
korrigan , Based on what I got so far
In you date table create a column rank on year period
Period Rank = RANKX(all(Period),Period[year period],,ASC,Dense)
Then you can have measure like example measure
This Period = CALCULATE(sum('Table'[Qty]), FILTER(ALL(Period),Period[Period Rank]=max(Period[Period Rank])))
Last Period = CALCULATE(sum('Table'[Qty]), FILTER(ALL(Period),Period[Period Rank]=max(Period[Period Rank])-1))
Same what we do for week
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8
- korrigan5 years agoRegular Visitor
Thank you for your answer but I'm not sure it's solving my problem: The column "OPS Period Index" I'm using is the same as the PEriod Rank you're proposing (the only difference is that it is calculated in the database).
The problem is the fact that my formula (or yours) is not working when I bring it in a composite dataset (aka: a dataset based ona published dataset).