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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Percentiles using DAX using COUNT and Variables

Hello,

 

so i want to calulate the 25 Percentile and the 75 Percentile for the total number of customers who came to my store based on daily data. So i have a customer ID, i have more than 200 store locations, and i have daily data for the customer IDs who came to my store.

 

What i want here is to do a distinctcount for the customers who came to my store DAILY, and then see the 25 Percentile for the number of customers who came to my store last year based on the daily data, and then to rank them based on the store location.

 

For an example,

 

In  Boston Store, on 01.02.2020 500 customer came (200 Unique Customer ID)

In  Boston Store, on 01.03.2020 200 customer came (140 Unique Customer ID)

In  Boston Store, on 01.04.2020 900 customer came (300 Unique Customer ID)

In  Boston Store, on 01.05.2020 1000 customer came (110 Unique Customer ID)

 

So for the Boston store, for those 4 days, the 25 percentile would be 110.

 

I of course have more complex data and more than 200 store locations. All i found online was Percentile for the sum and not for the count / distinctcount.

 

This link was a bit helpful, but not really what i look for:

 

https://xcelanz.com/dynamic-percentiles-using-dax/

 

Thanks 🙂

3 REPLIES 3
Anonymous
Not applicable

@Anonymous 

This sounds doable, please provide a sample data of you model.


Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

hi @Anonymous 

 

Thank you for your reply ! Here is a sample data that i work with:

 

CustomerIDDateSalesLocation
101/01/20202Boston
201/01/20204Chicago
302/01/20205New York
402/01/20206Boston
503/01/20208Chicago
604/01/202010New York
705/01/202012Boston
801/01/202014Chicago
901/01/202016New York
1002/01/202018Boston
1102/01/202020Chicago
1203/01/202022New York
1304/01/202024Boston
1405/01/202026Chicago
1501/01/202028New York
1601/01/202030Boston
1702/01/202032Chicago
1802/01/202034New York
1903/01/202036Boston
2004/01/202038Chicago
105/01/202040New York
201/01/202042Los Angelos
301/01/202044Los Angelos
402/01/202046Los Angelos
502/01/202048Los Angelos
603/01/202050Los Angelos
704/01/202052Los Angelos
805/01/202054Los Angelos
911/01/202056New York
1012/01/202058New York
1113/01/202060New York
1214/01/202062New York
1302/01/202064New York
1403/01/202066New York
1504/01/202068New York
1605/01/202070New York
1701/01/202072Boston
1801/01/202074Boston
1902/01/202076Boston
2002/01/202078Boston
1503/01/202080Boston
1624/01/202082New York
1725/01/202084Boston
1826/01/202086Chicago
1927/01/202088New York
2028/01/202090Boston
1506/01/202092Chicago
1602/01/202094New York
1702/01/202096Boston
1803/01/202098Boston
1924/01/2020100New York
2025/01/2020102Boston
1506/01/2020104Chicago
1602/01/2020106Boston
1702/01/2020108Boston
1803/01/2020110New York
1924/01/2020112Boston
2025/01/2020114Chicago
1806/01/2020116Boston
1802/01/2020118New York
1802/01/2020120Boston
1803/01/2020122Chicago
1824/01/2020124Boston
1825/01/2020126Chicago
1806/01/2020128Boston
1602/01/2020130Chicago
1702/01/2020132Boston
1803/01/2020134Chicago
1924/01/2020136Chicago
2025/01/2020138Chicago
1504/01/2020140Chicago
1605/01/2020142Chicago
1611/01/2020144Chicago
1712/01/2020146Chicago
1813/01/2020148Chicago
1914/01/2020150New York
2002/01/2020152Boston
1506/02/2020154Chicago
1605/01/2020156New York
1601/01/2020158Boston
1701/01/2020160Boston
1802/01/2020162New York
1902/01/2020164Boston
2003/01/2020166New York
1524/01/2020168Boston
2025/01/2020170Chicago
2026/01/2020172New York
2027/01/2020174Boston
1705/01/2020176Boston
1701/01/2020178New York
1701/01/2020180New York
1702/01/2020182New York
1702/01/2020184New York
1703/01/2020186New York
2001/01/2020188New York
1502/01/2020190New York
2002/01/2020192New York
2003/01/2020194New York
2004/01/2020196New York
1705/01/2020198New York
1701/01/2020200Chicago
1701/01/2020202Chicago
1702/01/2020204Chicago
1702/01/2020206Chicago
2003/01/2020208Chicago
1504/01/2020210Chicago
2001/01/2020212Chicago
2002/01/2020214New York
2002/01/2020216New York
1703/01/2020218New York
1704/01/2020220New York
1705/01/2020222New York
1701/01/2020224New York
2001/01/2020226New York
1502/01/2020228New York
2002/01/2020230New York
2003/01/2020232Chicago
2004/01/2020234Chicago
1701/01/2020236Chicago
1702/01/2020238Chicago
1702/01/2020240Chicago
1703/01/2020242Chicago
1804/01/2020244Chicago
1905/01/2020246Chicago
Anonymous
Not applicable

Hi @V-pazhen-msft

CustomerIDDateSalesEquipment
101/01/20202Cars
201/01/20204Bicycle
302/01/20205Planes
402/01/20206Cars
503/01/20208Bicycle
604/01/202010Planes
705/01/202012Cars
801/01/202014Bicycle
901/01/202016Planes
1002/01/202018Cars
1102/01/202020Bicycle
1203/01/202022Planes
1304/01/202024Cars
1405/01/202026Cars
1501/01/202028Bicycle
1601/01/202030Planes
1702/01/202032Cars
1802/01/202034Bicycle
1903/01/202036Planes
2004/01/202038Cars
105/01/202040Bicycle
201/01/202042Planes
301/01/202044Cars
402/01/202046Bicycle
502/01/202048Planes
603/01/202050Cars
704/01/202052Cars
805/01/202054Bicycle
911/01/202056Planes
1012/01/202058Cars
1113/01/202060Bicycle
1214/01/202062Planes
1302/01/202064Cars
1403/01/202066Bicycle
1504/01/202068Planes
1605/01/202070Cars
1701/01/202072Bicycle
1801/01/202074Planes
1902/01/202076Cars
2002/01/202078Cars
1503/01/202080Bicycle
1624/01/202082Planes
1725/01/202084Cars
1826/01/202086Bicycle
1927/01/202088Planes
2028/01/202090Cars
1506/01/202092Bicycle
1602/01/202094Planes
1702/01/202096Cars
1803/01/202098Bicycle
1924/01/2020100Planes
2025/01/2020102Cars
1506/01/2020104Cars
1602/01/2020106Bicycle
1702/01/2020108Planes
1803/01/2020110Cars
1924/01/2020112Bicycle
2025/01/2020114Planes
1806/01/2020116Cars
1802/01/2020118Bicycle
1802/01/2020120Planes
1803/01/2020122Cars
1824/01/2020124Bicycle
1825/01/2020126Planes
1806/01/2020128Cars
1602/01/2020130Cars
1702/01/2020132Bicycle
1803/01/2020134Planes
1924/01/2020136Cars
2025/01/2020138Bicycle
1504/01/2020140Planes
1605/01/2020142Cars
1611/01/2020144Bicycle
1712/01/2020146Planes
1813/01/2020148Cars
1914/01/2020150Bicycle
2002/01/2020152Planes
1506/02/2020154Cars
1605/01/2020156Cars
1601/01/2020158Bicycle
1701/01/2020160Planes
1802/01/2020162Cars
1902/01/2020164Bicycle
2003/01/2020166Planes
1524/01/2020168Cars
2025/01/2020170Bicycle
2026/01/2020172Planes
2027/01/2020174Cars
1705/01/2020176Bicycle
1701/01/2020178Planes
1701/01/2020180Cars
1702/01/2020182Cars
1702/01/2020184Bicycle
1703/01/2020186Planes
2001/01/2020188Cars
1502/01/2020190Bicycle
2002/01/2020192Planes
2003/01/2020194Cars
2004/01/2020196Bicycle
1705/01/2020198Planes
1701/01/2020200Cars
1701/01/2020202Bicycle
1702/01/2020204Planes
1702/01/2020206Cars
2003/01/2020208Cars
1504/01/2020210Bicycle
2001/01/2020212Planes
2002/01/2020214Cars
2002/01/2020216Bicycle
1703/01/2020218Planes
1704/01/2020220Cars
1705/01/2020222Bicycle
1701/01/2020224Planes
2001/01/2020226Cars
1502/01/2020228Bicycle
2002/01/2020230Planes
2003/01/2020232Cars
2004/01/2020234Cars
1701/01/2020236Bicycle
1702/01/2020238Planes
1702/01/2020240Cars
1703/01/2020242Bicycle
1804/01/2020244Planes
1905/01/2020246Cars

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors