Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am making a P&L table but I only need to show data for the past 3 yrs which means 3 rows of data.
Problem is that the database contains data for more years and for different dates, i.e. there are entries for each quarter.
I need to show the data for 31/12/YYYY for the last three years.
Is it possible to do this in straight table?
HI
For that, you can try like this
=If(Match(STATEMENT_DATE,YearEnd(STATEMENT_DATE)),STATEMENT_DATE) as dimension
or
If(STATEMENT_DATE = YearEnd(STATEMENT_DATE),STATEMENT_DATE) as dimension
Guys,
I'm not sure whether it helps to your application but the best practice is not to use if() in dimensions or expressions due to big impact to performance. The best practice is to use set analysis and in your case it's possible to create flag in calendar for each december 31th, also you can have such flags for periods you need to analyse (previous year, last 3 year, etc).
Believe me since I managed with performance degradation only after rewriting all if()'s with set analysis expressions in an application with 300 millions transactions.
Best regards,
Maxim