cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Calculating 'Total Year Budget' and 'Remaining Budget' based on date slicer

Hi

 

I'm trying to create a 'Budget follow up' report, but have a challenge when trying to calculated Budget numbers based on Date slicer.

 

CalculateBudget.jpg

Based on Date slicer I have the correct GL and Budget numbers for the period (July 2019) as well as the YTD numbers (Jan - July).

My problem is calculating:

 

1.
Total Year Budget: The full Budget amount for the GL Account in 2019 (as this is the year in Date slicer) 

I have tried this, based on other suggestions, but it still returns the Budget for the period:

Total Year Budget = SUMX(FILTER('G_L Budget Entry';RELATED('Date'[Year]));('G_L Budget Entry'[Amount]))

 

 

2.
Remaining Budget: The remaining Budget amount based on Date slicer. In this case the sum of Budget amount from August to December. 
(It could be calculated by 'Total Year Budget' - 'YTD Budget', but would be nice to know the solution for 'Remaining Budget' in itself.)

 

Data is based on 2 fact tables: 'G_L Entry' and 'G_L Budget Entry'

... and of cause a Date table added.

Can someone enlighten me? 🤔

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Calculating 'Total Year Budget' and 'Remaining Budget' based on date slicer

Hi @RonnySA ,
 
1. I set the relationship between your 'date' table and other tables as inactive.
2. I used the 'userelationship' function in the measure you created earlier.
3.I created the 'year' column in the 'g _l budget entry' table
4.I created a 'budget full year' measure using the following DAX
Budget Full Year = CALCULATE(SUM('G_L Budget Entry'[Amount]),FILTER('G_L Budget Entry','G_L Budget Entry'[Year]=SELECTEDVALUE('Date'[Year])))
test_budget_full_year.PNG
For more detail,you can refer to the pbix.
 
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Microsoft
Microsoft

Re: Calculating 'Total Year Budget' and 'Remaining Budget' based on date slicer

Hi @RonnySA ,
 
I think you can use the ALL function to solve this problem.
If the problem persists,could you please share sample data or sample pbix? (Please mask any sensitive data before uploading)
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Calculating 'Total Year Budget' and 'Remaining Budget' based on date slicer

Hi Liang

@V-lianl-msft 

 

I have tried ALL function, but keep getting the budget for the period, or the total budget sum (the whole budget) for each specific account.

The aim is to get the full year budget for each account specifically.

If possible also calculate the remaining budget, based on selection in Date slicer.

 

Quick sample pbix available here: (Let me know if no access)

Sample pbix 

 

 

 

 

Highlighted
Microsoft
Microsoft

Re: Calculating 'Total Year Budget' and 'Remaining Budget' based on date slicer

Hi @RonnySA ,
 
1. I set the relationship between your 'date' table and other tables as inactive.
2. I used the 'userelationship' function in the measure you created earlier.
3.I created the 'year' column in the 'g _l budget entry' table
4.I created a 'budget full year' measure using the following DAX
Budget Full Year = CALCULATE(SUM('G_L Budget Entry'[Amount]),FILTER('G_L Budget Entry','G_L Budget Entry'[Year]=SELECTEDVALUE('Date'[Year])))
test_budget_full_year.PNG
For more detail,you can refer to the pbix.
 
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Frequent Visitor

Re: Calculating 'Total Year Budget' and 'Remaining Budget' based on date slicer

Hi Liang
@V-lianl-msft 

 

Perfect! Great solution I haven't thought about the steps 1-3.

Learned something new today - Thanks!

Kind Regards
Ronny

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Community Summit Australia – Join Online!

Community Summit Australia – Join Online!

Be a part of the leading Microsoft Business Applications digital event, curated for the APAC community.

Top Solution Authors
Top Kudoed Authors