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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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

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

View solution in original post

ImkeF
Super User
Super User

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
Super User
Super User

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

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

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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