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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Actuals where they exist else plan

Hi All, 

 

Is it possble to come up with a measure that gives me the actuals where they exist else budget. 

 

For e.g., If we have actuals until jan, then i would like to see the graph showing JAN ACTUALS and from FEB to DEC budget. 

 

Thanks!!

3 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

Try like.

Actual = sum(table[Actual])

Budget= sum(Budget[Budget])

 

Over all = if(isbalnk([Actual] ),[Budget],[Actual])

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

ImkeF
Community Champion
Community Champion

Yes, but for the (sub) totals to add up correctly, you have to iterate through your date-dimension and calculate the value on a row-by row-basis. Whether that's the month- or day (or other) level, depends on your business requirements, but the general setup would look like so:

 

SUMX( Calendar[Month], if ( isblank( [Actual] ); [Budget]; [Actual] ) )

 

[Actual] and [Budget] being measures here.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

I agree with Imke Feldmann. You could reference the simple sample that I have done before.

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
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-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

Could you tell me if your problem has been solved? If it is, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from here.

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

I agree with Imke Feldmann. You could reference the simple sample that I have done before.

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ImkeF
Community Champion
Community Champion

Yes, but for the (sub) totals to add up correctly, you have to iterate through your date-dimension and calculate the value on a row-by row-basis. Whether that's the month- or day (or other) level, depends on your business requirements, but the general setup would look like so:

 

SUMX( Calendar[Month], if ( isblank( [Actual] ); [Budget]; [Actual] ) )

 

[Actual] and [Budget] being measures here.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

amitchandak
Super User
Super User

Try like.

Actual = sum(table[Actual])

Budget= sum(Budget[Budget])

 

Over all = if(isbalnk([Actual] ),[Budget],[Actual])

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!