Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
jackj
Helper I
Helper I

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?

2 REPLIES 2
jackj
Helper I
Helper I

@Greg_Deckler 

 

Thanks for publishing!  The issue I'm having though is that I'm looking to find the quartile ranges for a measure, not a column - does that change the DAX at all?

Greg_Deckler
Super User
Super User

@jackj I did a bunch of stuff for quartiles here that might help:

QUARTILE - Microsoft Power BI Community

QUARTILE.EXC - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors