Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

Hi @Anonymous ,
 
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
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,
 
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.
Anonymous
Not applicable

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 

 

 

 

 

Hi @Anonymous ,
 
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.
Anonymous
Not applicable

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.