Forum Discussion
DAX help
- 5 years ago
mberndt , for all such case you you should have seperate table ITERATION or period and Try like
Assumsing [ITERATION] is column not measure
CALCULATE (
SUM ( NC_FALLOUT_TREND_DATA[FALLOUT_COUNT] ),
FILTER ( 'ITERATION', [ITERATION] = MAX ( [ITERATION] ) )
)CALCULATE (
SUM ( NC_FALLOUT_TREND_DATA[FALLOUT_COUNT] ),
FILTER (all( 'ITERATION'), [ITERATION] = MAX ( [ITERATION] ) - 1 )
)similar approach what I use for the week
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
mberndt , hope for t-1 you are using all in filter like -all( 'ITERATION')
Because if "t" is selected, then you will not get t-1
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
amitchandak I am sorry, it works well right now... Thank you for your quick replies, really appreciated!