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

Correct Sub-Total and Total

Shay A

Member
Hi,

I am trying to get the correct target sales for each sales manager. The target table is the one side and the sales table is the fact table.

The numbers in red are incorrect.


TY!
 

Attachments

  • Sales vs Target.xlsx
    482.7 KB · Views: 4
Avg calculation is correct as per your table.

If you want to show average as (11m + 7m)/2 for George... then you'd need to keep dimension (target table) and fact table separate, as well as adding another table for Sales Manager - Sales Rep dimension.

Then you'd use column(s) from dimension tables as row labels and aggregate data based on it.

As general rule of thumb, don't merge dimension to fact table (or don't add it as calculated column).

Edit: You could use complex DAX to to handle separate calculation for subtotal/total... but that kind of defeats the purpose of setting up data model for analysis.
 
My preference is to avoid calculated columns in fact table. I prefer to keep dimension table separate from fact table and use measures to aggregate data.

But if you are happy with your result and if no extra dimensions are needed for analysis. Go with it.
 
Back
Top