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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ttansriw
Frequent Visitor

Actual with remaning budget

Hi ,

 

I want to create measure that contains actual with remaining budget and also show in YTD

I have data like this 

 

MonthActBudget
Jan1020
Feb1020
Mar1020
Apr1010
May 10
Jun 10
Total4090

 

all I want is to be like this

 

MonthActBudgetAct+BudAct+Bud (YTD
Jan10201010
Feb10201020
Mar10201030
Apr10101040
May 101050
Jun 101060
Total40906060

 

I tried some method but it doesn't work

Is there any way I can do? Please help. Thank you.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @ttansriw 

Please check the below picture and the sample pbix file's link down below.

The measures are in the sample pbix file.

Please be noted that the measures are not considering the year column, because there is no year column in the sample.

If you can share your sample pbix file's link here, I can try to look into it to come up with more accurate measures.

 

Picture8.png

 

Actual & Budget Remaining =
SUMX (
VALUES ( 'Table'[Month] ),
CALCULATE ( SUM ( 'Table'[Act] ) )
+ CALCULATE ( IF ( SUM ( 'Table'[Act] ) = BLANK (), SUM ( 'Table'[Budget] ) ) )
)
 
Actual & Budget Remaining YTD =
CALCULATE (
[Actual & Budget Remaining],
FILTER (
ALL ( 'Table' ),
'Table'[Month Number] <= MAX ( 'Table'[Month Number] )
)
)
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi, @ttansriw 

Please check the below picture and the sample pbix file's link down below.

The measures are in the sample pbix file.

Please be noted that the measures are not considering the year column, because there is no year column in the sample.

If you can share your sample pbix file's link here, I can try to look into it to come up with more accurate measures.

 

Picture8.png

 

Actual & Budget Remaining =
SUMX (
VALUES ( 'Table'[Month] ),
CALCULATE ( SUM ( 'Table'[Act] ) )
+ CALCULATE ( IF ( SUM ( 'Table'[Act] ) = BLANK (), SUM ( 'Table'[Budget] ) ) )
)
 
Actual & Budget Remaining YTD =
CALCULATE (
[Actual & Budget Remaining],
FILTER (
ALL ( 'Table' ),
'Table'[Month Number] <= MAX ( 'Table'[Month Number] )
)
)
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

@Jihwan_Kim  Thank you so much!! It works perfectly!! 
😍

amitchandak
Super User
Super User

@ttansriw , Assume you have date. With help from Date table, Month is Date table and time intelligence , please try measures like (3 measures)

 

Budget M = sum(Table[Budget])


Act M = sum(Table[Act])

 

Act+Bud (YTD) = calculate(sumx(values('Date'[Month Year]) , if(isblank([Act M]), [Budget M ],[Act M])), datesytd('Date'[Date]))

 

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@amitchandak  Thanks!! I also tried this method, but YTD calculate the actual only. 

and I do have calendar and marked it as date table.

 

Ps. my data is in the same table . Could this cause the effect that dax doesn't work well ?

 

Budget M = 

CALCULATE(
SUM(t[Value]),
t[Type] ="bu"
)



 

Budget M = 

CALCULATE(
SUM(t[Value]),
t[Type] ="act"
)

 

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.