Forum Discussion
creating forecast based on 1 month
- 6 years ago
Hi Icey,
When creating the dummy data i discovered my error!
I noticed this when i created the matrix in the dummy file which would not show any months past March.
The error was in this part:
SUMMARIZE('Calendar';'Calendar'[MonthNameShort]; "LASTMTD";IF(MONTH(MAX('fact'[boekingsdatum]))>MAxMonth;CALCULATE([ReportingBedrag AC];ALL('Calendar'[Date]);MONTH('Calendar'[Date])=MaxMonth);[Reporting bedrag MTD AC]))Right after the first IF i refer to the "fact" table date. This only runs up to March so i need to pick the mastercalender table here like so:
SUMMARIZE('Calendar';'Calendar'[MonthNameShort]; "LASTMTD";IF(MONTH(MAX('Calendar'[Date]))>MAxMonth;CALCULATE([ReportingBedrag AC];ALL('Calendar'[Date]);MONTH('Calendar'[Date])=MaxMonth);[Reporting bedrag MTD AC]))Now i get all details, correct row totals and correct grand total!
Hi RJPK ,
Please share me a dummy PBIX file, only with the necessary parts, for specific test. Please remove sensitive information and replace real data with dummy data. It is suggested to upload your file to OneDrive for Business and then paste the link here.
Best Regards,
Icey
Hi Icey,
When creating the dummy data i discovered my error!
I noticed this when i created the matrix in the dummy file which would not show any months past March.
The error was in this part:
SUMMARIZE('Calendar';'Calendar'[MonthNameShort];
"LASTMTD";IF(MONTH(MAX('fact'[boekingsdatum]))>MAxMonth;CALCULATE([ReportingBedrag AC];ALL('Calendar'[Date]);MONTH('Calendar'[Date])=MaxMonth);[Reporting bedrag MTD AC]))
Right after the first IF i refer to the "fact" table date. This only runs up to March so i need to pick the mastercalender table here like so:
SUMMARIZE('Calendar';'Calendar'[MonthNameShort];
"LASTMTD";IF(MONTH(MAX('Calendar'[Date]))>MAxMonth;CALCULATE([ReportingBedrag AC];ALL('Calendar'[Date]);MONTH('Calendar'[Date])=MaxMonth);[Reporting bedrag MTD AC]))
Now i get all details, correct row totals and correct grand total!