• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

CALCULATE results in a blank row.

datiduke

New Member
Hi,
I have a problem and dont know how to solve it.
I want to display the sales by Branch and Category, but in the other column I want to have the sales by region and the national sales to compare it with.
Filter: Branch1
BranchSales RegionalSales NationalSales
Category1: 100,000 200,000 300,000
Category2: 100,000 200,000 300,000
So I use this measure:
Regional: =CALCULATE(SUM(Sales[NetSales]),ALL(Sales[Branch]))
National: =CALCULATE(SUM(Sales[NetSales]),ALL(Sales[Region]),ALL(Sales[Branch]))
And it works if the branch has sold something.
But I have some branches who have sold nothing in a certain category. Usually I would expect something like:
Filter: Branch2
Branch-Sales Regional Sales NationalSales
Category1: 100,000 200,000 300,000
Category2: 200,000 300,000
But that is not what I get. I get virtually a blank row for Cat2:
Filter: Branch2
Branch-Sales Regional Sales NationalSales
Category1: 100,000 200,000 300,000
Category2:
Does anybody know why and how I can show the regional and national sales even when the branch has not sold anything in Category2?
 
sorry, once I posted it, the thread took out all spaces I had. The BranchSales are 100k, regional sales are 200k, and nationalsales are 300k.
 
Datiduke

Can you post a sample file please
It is too hard to try and understand what you have got from the above
 
Hi Hui,
here you can see that we have had regional and national sales from BranchA. I hope you can understand even that I blanked out some numbers.
nationalsales.PNG


If I select a different BranchB, I get this:
nonationalsales.PNG
So as a Branch may not have sales in one category, it should display the regional and national sales for all other branches, right?

But somehow it doesnt.?!?

Thanks.
Andy
 
Back
Top