Forum Discussion
srk_powerbi
5 years agoHelper II
custom YTD calculation help
hi, I want to calculate YTD, Previous YTD sales total calculations. But here in my date table, Fiscal year start from 01/05/2021 for year 2021 and for each year it is different. I have two columns ...
- 5 years ago
Hi srk_powerbi ,
You could try the following measure:
YTD = CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Date]>='Table'[FiscalYearStartDate]&&'Table'[Date]<=NOW()))PREYTD = CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Date]>='Table'[PreFiscalYearStartDate]&&'Table'[Date]<=NOW()))Wish it is helpufl for you!
Best Regards
Lucien
v-luwang-msft
5 years agoCommunity Support
Hi srk_powerbi ,
You could try the following measure:
YTD = CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Date]>='Table'[FiscalYearStartDate]&&'Table'[Date]<=NOW()))PREYTD = CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Date]>='Table'[PreFiscalYearStartDate]&&'Table'[Date]<=NOW()))
Wish it is helpufl for you!
Best Regards
Lucien