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
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.


Go to My LinkedIn Page


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.


Go to My LinkedIn Page


@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.

@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
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.