The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone,
I need DAX formula for calculating previous and current YTD, previous and current QTD and previous and current MTD.
Solved! Go to Solution.
Hi @AishwariyaV
You may try below measures. Below is the similar post for your reference.
Sales_YTD = TOTALYTD(SUM('Table'[Sales]),'Table'[Date])
Sales_YTD_Previous = CALCULATE([Sales_YTD],SAMEPERIODLASTYEAR('Table'[Date]))
https://community.powerbi.com/t5/Desktop/Prior-Year-YTD-won-t-calculate/td-p/463729
Regards,
It is not working
Hi @AishwariyaV
You may try below measures. Below is the similar post for your reference.
Sales_YTD = TOTALYTD(SUM('Table'[Sales]),'Table'[Date])
Sales_YTD_Previous = CALCULATE([Sales_YTD],SAMEPERIODLASTYEAR('Table'[Date]))
https://community.powerbi.com/t5/Desktop/Prior-Year-YTD-won-t-calculate/td-p/463729
Regards,
User | Count |
---|---|
77 | |
75 | |
36 | |
31 | |
29 |
User | Count |
---|---|
94 | |
80 | |
55 | |
48 | |
48 |