Forum Discussion

jackj's avatar
jackj
Helper I
4 years ago

Quartile Analysis

Hi,

 

I'm working to create quartiles based on an average measure.  My dataset is structured as follows:

 

Date Table with two columns: [Date] and [Week End]

 

Customer Table with four columns: [User ID] [Store ID] [Total Sales] [Week End]

 

Many:One Relationship between Customer Table [Week End] and Date Table [Date]

 

I have a measure in the Customer Table to calculate the # of Unique User IDs each week:

Unique Customers = CALCULATE(SUMX(VALUES('Customers'[UserID]),1))
 
I have another measure to tell me the number of stores each week:
Weekly Reporting Units = CALCULATE(SUMX(Values('Customers'[Company ID]),1))
 
Finally, a third measure to tell me the # of unique customers per store:
Unique Customers / Unit = DIVIDE('Daycare Customers'[Unique Customers],[Weekly Reporting Units])
 
I am struggling with the output of my quartile measure to identify the top quartile of Unique Customers / Unit.  My current measure is:
 
Top Quartile = PERCENTILEX.INC('Customers','Customers'[Unique Pet Parents / Unit],.75)
 
The table returned is below:
 
Week EndUnique Customers / UnitTop Quartile
3/5/22173.781.00
3/12/22173.541.00
3/19/22170.331.00
3/26/22175.261.00
4/2/22173.621.00
4/9/22176.441.00
4/16/22172.991.00
4/23/22176.851.00
4/30/22176.871.00
5/7/22178.411.00
5/14/22169.921.00
5/21/22172.011.00

 

I have no idea why the quartile calculation is not returning the appropriate values.  Any suggestions?