Hi I have two tables, ActualTrans and BudgetTrans, which contain as you may suspect actuals and budget, for the sake of the argument we could say there are 4 columns in each table:
ActualTrans
Transdate, Company, Account, Amount
BudgetTrans
TransDate, Company, Account, Amount
What I want to achieve is to have the TotalYTD to conditionally use BudgetTrans[Amount]) or ActualTrans[Amount] depending on whether I have actuals or not for a company in that period. Meaning that IF I filter my dashboard on i.e. January to August 2016, and only 10 out of the 35 companies in that point of time has closed their accounts I want to use actuals for the 10 companies in all eight periods, while for the remaining 25 I want to use the actuals for the first 7 months and budget for the last .
I'm able to achieve this using a crossjoin table where I can aggregate my actuals and budgets per month and company and then apply some simple if statements to choose whether to use either budget or actuals for a company in a specific month.
But there must be a more elegant way to achieve the same thing, which doesn’t depend upon an aggregation table and fixes this using DAX statements.
If this doesn’t make sense I can add that this is to give a prediction for the aggregated group EBIT and Revenue while the accounts are in the process of being closed.
any insights are greatly appreciated.
BR
FC