Forum Discussion
Anonymous
5 years agoNot applicable
MTD CALCULATIONS FOR LAST 5 MONTHS
Hello Guys, Hope you are well, I have one problem, I have to calculate MTD for last 5 months like right now we have in Aug21 so last 5 months would be Aug21,July21,Jun21,May21,Apr21 and today...
- Anonymous5 years ago
Hi,
I am trying this but out is showing blank
Pre_Month-2 = CALCULATE(TOTALMTD([Sec_Vol],'db_CSA_Data Yield_Sec_Test'[InvoiceDate],PARALLELPERIOD('db_CSA_Data Yield_Sec_Test'[InvoiceDate],-3,MONTH)))[Sec_vol]- it is already in sumPlease help me on this - Anonymous5 years ago
Got it by my own logic,
prev month MTD Vol = CALCULATE(SUM('VIT-IK SAP_Secondary_data'[Volume]),FILTER('VIT-IK SAP_Secondary_data',DAY('VIT-IK SAP_Secondary_data'[InvoiceDate])>=1 && DAY('VIT-IK SAP_Secondary_data'[InvoiceDate])<=DAY(MAX('VIT-IK SAP_Secondary_data'[InvoiceDate]))),FILTER('VIT-IK SAP_Secondary_data',(YEAR('VIT-IK SAP_Secondary_data'[InvoiceDate])=YEAR(MAX('VIT-IK SAP_Secondary_data'[InvoiceDate]))&&MONTH('VIT-IK SAP_Secondary_data'[InvoiceDate])=MONTH(MAX('VIT-IK SAP_Secondary_data'[InvoiceDate]))-1)))It is giving me 1-4th July 21 vol=758 that is correct
Anonymous
5 years agoNot applicable
This dax giving me full month sales instead of 1-5th Jul21.
Anonymous
5 years agoNot applicable
output should be 758 for 1-4th July 21.
- Anonymous5 years agoNot applicable
Got it by my own logic,
prev month MTD Vol = CALCULATE(SUM('VIT-IK SAP_Secondary_data'[Volume]),FILTER('VIT-IK SAP_Secondary_data',DAY('VIT-IK SAP_Secondary_data'[InvoiceDate])>=1 && DAY('VIT-IK SAP_Secondary_data'[InvoiceDate])<=DAY(MAX('VIT-IK SAP_Secondary_data'[InvoiceDate]))),FILTER('VIT-IK SAP_Secondary_data',(YEAR('VIT-IK SAP_Secondary_data'[InvoiceDate])=YEAR(MAX('VIT-IK SAP_Secondary_data'[InvoiceDate]))&&MONTH('VIT-IK SAP_Secondary_data'[InvoiceDate])=MONTH(MAX('VIT-IK SAP_Secondary_data'[InvoiceDate]))-1)))It is giving me 1-4th July 21 vol=758 that is correct