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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
knotpc
Advocate I
Advocate I

Row totals for basic NestIF not totaling as expected.

Hoping the gurus on Power BI can help. Also, open to alternative methods. 

 

I have a measure "Predicted Revenue EoY = IF([Revenue]>[ForecastRevenue],[Revenue],[ForecastRevenue])". The measure is fairly straight forward and it calculates the values correctly for each row. However, when used in a table the SUM of the totals is totally wrong. Not sure what I am doing wrong with this one. 

 

For background here is what I have in terms of measures all of which are in a "Formulas Table". 

 

Invoiced = SUM(Sales[Invoiced]) "This table is the sum of all revenue that has been invoiced"

Revenue + Backlog = SUM(Sales[Revenue])+SUM(Backlog[Revenue]) "This measure combines what has been invoiced with the backlog of orders."

Forecast Revenue = SUM(Forecast[Revenue])

Predicted Revenue EoY = IF([Revenue]>[ForecastRevenue],[Revenue],[ForecastRevenue])

 

All of the tables above a linked to a Calendar Table. 

 

Below is an example of what the measures are returning. (Real values replaced to protect the innocent. 🙂

Example.PNG

 

As you can see Invoiced, Revenue+Backlog and Forecast Revenue SUM correctly. For some reason, the Predicted Revenue EoY is not summing correctly as it matches the Revenue+Backlog sum even though it shows values for November and December. The sum should be $17000, not $11000.  

 

Hoping some guru can tell me what I am doing wrong on this one. 

 

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@knotpc there are many blogs and post on this and here is link to one. Hope this helps.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

@knotpc ,

 

Could you please share the two tables 'Sales' and 'Forecast' and show the expected result?

 

Regards,

Jimmy Tao

kentyler
Solution Sage
Solution Sage

Remember, the value in the "totals" row is not the values from the forecast revenues column added up.

Your measure calculates the value for each row because it is being filtered for just that row.

In the totals row there is no filter, so the measure adds all the values for all the rows together.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


parry2k
Super User
Super User

@knotpc there are many blogs and post on this and here is link to one. Hope this helps.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Parry2K, 

 

Thank you for the link. It led me down the path to understanding that the measure I wrote was dead wrong for the use case. So back to the drawing board I go. 

 

Clint. 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

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