Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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.
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
User | Count |
---|---|
122 | |
69 | |
67 | |
58 | |
52 |
User | Count |
---|---|
189 | |
96 | |
67 | |
63 | |
53 |