I am really confused what i am doing wrong using TREATAS.
So i have used TREATAS doing a budget on “regional level” of 6% of sales for 2015.
So i have copied the power bi table into excell - and have checked this number for “Jan-2015” add up well and is correct! happy days!!
So my budget allocation per month and year - breakdown looks fine (Reconciled in Excel)
However when I use the dax to get a daily level I am confused as to why the number for daily level is not fixed. i.e. Jan-2015 £255,745 / 31 = £8,249.
Total Budget (Region) = CALCULATE(SUM('Regional Budgets'[2016 Regionnal Budgets]), TREATAS(VALUES(Dates[MonthYearFull]),'Regional Budgets'[MonthYearFull])) Budget Allocation (Region) = VAR DaysInMonth = CALCULATE(COUNTROWS(Dates),ALL(Dates),VALUES(Dates[MonthYearFull])) VAR ActualBudget = [Total Budget (Region)] RETURN IF(ISFILTERED(Dates[Date]), DIVIDE(ActualBudget,DaysInMonth,0),[Total Budget (Region)])