Forum Discussion

toddpbi's avatar
toddpbi
Helper II
8 years ago

Time Intelligence without Date Tables

Hello there everyone,

 

Currently I am trying to calculate a measure that displays total budget YTD.

 

However, my budget data is on a monthly granularity and I have used the following DateKeys with format (YYYYMM) within my date table to connect the budget data to the calendar dates table.

 

Is it possible to write a DAX formula to calculate budgets YTD without using the column that is formatted "dates" within my date table?

 

Currently, I am using the following DAX formula to calculate cumulative budgets YTD:

Cumulative Budgets YTD = IF( LASTDATE( 'Calendar Dates'[Date Format]) > TODAY(),
    BLANK(),
        CALCULATE( [Total Budgets],
            FILTER( ALLSELECTED( 'Calendar Dates' ),
                'Calendar Dates'[DateKey] <= MAX( 'Calendar Dates'[DateKey] ))))

 

When I try to display my "Budget Accounts" on the rows with Budgets YTD and Actuals YTD, the actuals appear but the budgets do not (ie I am getting blanks for all of my cumulative budget values). Any idea why this is happening? I have attached pictures of my model for your reference. I want to filter the budget accounts table to show YTD Actuals and YTD Budgets on the columns, however Budgets YTD continually shows the budget for the full 12 months instead of up to today. I have budget data for the entire year but I only want to compare it to the period in time of the current year. In addition, I am also getting a blank value, the reason I do not know why.

Any help to solve my issues would be appreciated a lot.

 

 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI toddpbi,

     

    I'm not so clear for your data and formula, can you please provide more detailed information about this?

    For example: measure formulas, sample data, pbix file.

     

    Regards,

    Xiaoxin Sheng