Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

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


Group: General Forum Members
Last Login: Tuesday, May 3, 2016 4:05 PM
Points: 10, Visits: 444
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.


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

Add to briefcase

Permissions Expand / Collapse