I want to be able to get a data model using Analytical Account Budget Tree / Budget Data for BudgetID 2020, against Actual Net Amount from GL?
Is their any sql queries to help me join to two together, or a bridge table?
Bellow is some of the things I done so far? Any advice would be welcomed..
Has anyone gotten a sql view be able to create a data model in power bi, for Budget Amounts (Budget allocation for projects Dimensions) VS NetAmount (actual amount spent)?
So far I only been able to do this model. using multiple sql queries for different tables in my model.
But I notice that I can't match actual Net Amount to Budget Tree Budget Amounts?
I am also using some Dax Measures for Budgets vs Actual
Budget V Actual = 'Budget Measures'[Budget Allocations 2] - 'Budget Measures' [Total Acutals]
Total Actuals = SUM('Project Data'[NetAmount])'
Budget Allocation 2 =
VAR DaysInContext = COUNTROWS( Dates)
VAR DaysInMonth = CALCULATE( COUNTROWS( Dates ), ALL( Dates ), VALUES( Dates[Month & Year]) )
VAR DaysInQuater = CALCULATE( COUNTROWS( Dates), ALL( Dates ), VALUES(Dates[Quater]))
VAR DaysInYear = CALCULATE( COUNTROWS( 'Dates'), ALLEXCEPT( Dates, 'Dates'[Year] ))
VAR CurrentMonth = SELECTEDVALUE(Dates[MonthName] )
VAR MonthlyBudgetAmounts =
CALCULATE( [Total Budget], TREATAS( VALUES('Project Data'[MonthName]), 'Project Data'[MonthName]) )
Return
IF( OR( HASONEVALUE(Dates[Date]), HASONEVALUE( Dates[Month & Year] ) ),
DIVIDE( DaysInContext, DaysInYear, 0) * MonthlyBudgetAmounts,
[Total Budget])