Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

calcualte average by flag value in dimensions Expand / Collapse
Author
Message
Posted Wednesday, October 16, 2013 11:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 18, 2013 10:51 AM
Points: 4, Visits: 349
Hello Everyone,
I am trying to find the average sales by day if the flag value in dimension is Y or N. I am able to do it without Y or N and its working fine. But i dont know how to get average when flag value(whichis in flag_dimension). Here is my data model is attached.


The overallAvg below column i found it by a calculated member by followign 3 steps.
1. Find sum of price measures
2. Find the count
3. Sum/count and this gave me exact result.

But what if i want to find average only if FlagA is Y and average when FlagA is Y and flagB is Y/N.

Any help will be greatly appreciated.

Thanks


  Post Attachments 
Datamodel.png (2 views, 133.74 KB)
Post #1505352
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse