Forum Discussion

SimonLTM's avatar
SimonLTM
Regular Visitor
9 years ago
Solved

Payment Forecast & calculated table

Hello MS-BI Community,   I am new here and I want to ask for help with following issue.   I have a contract table about periodic monthy or yearly payments. contractno date enddate formula ...
  • SimonLTM's avatar
    SimonLTM
    9 years ago

    I found the solution in making a crossjoin of the date table and a filtered contract table with dax forumlas generate and calculatedtable. It looks like this:

     

    forecasttable = GENERATE('Date';
    CALCULATETABLE(Tabelle1;
    FILTER(Tabelle1;
    or(AND(DAY(Tabelle1[startdate])=DAY('Date'[Date]);
    Tabelle1[formula]="1m");
    AND(DAY(Tabelle1[startdate])=DAY('Date'[Date]);
    AND(Tabelle1[formula]="1j";MONTH(Tabelle1[startdate])=MONTH('Date'[Date])))));
    FILTER(Tabelle1;
    Tabelle1[startdate]<=EARLIER('Date'[Date]));
    FILTER(Tabelle1;
    or(AND('Date'[Date]<=Tabelle1[enddate];
    NOT(ISBLANK(Tabelle1[enddate])));ISBLANK(Tabelle1[enddate])
    )
    )
    )
    )