March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am trying to create a measure that shows a quartile based on the rank of the vendor.
Currently, there are around 680 Vendors and it will be dynamic.
There should be 4 quartiles - Top 25%, Top 50%, Bottom 50%, Bottom 25%.
Here is the formula that I have now but it doesn't work correctly and I don't know how to improve it:
Vendor Quartile =
VAR TotalVendors = COUNTROWS(vDIM_Vendor_Daily)
VAR QuartileSize = ROUNDUP(TotalVendors / 4, 0)
RETURN
SWITCH(
TRUE(),
[OTIF Rank] <= QuartileSize, "Top 25%",
[OTIF Rank] <= 2 * QuartileSize, "Top 50%",
[OTIF Rank] <= 3 * QuartileSize, "Bottom 50%",
"Bottom 25%"
)
Please help!
Solved! Go to Solution.
hi @Mera9 ,
maybe try using this, if it fits your use case: Calculate Percentile in Power BI (youtube.com)
else another dax function that may come in handy: PERCENTILE.INC function (DAX) - DAX | Microsoft Learn
usage shown here : PERCENTILE.EXC, PERCENTILE.INC, PERCENTILEX.EXC, PERCENTILEX.INC - DAX Guide (youtube.com)
if this doesn't resolve the issue, kindly provide sample input and output data masking sensitive information and in a usable format ( table, excel etc.)
hi @Mera9 ,
maybe try using this, if it fits your use case: Calculate Percentile in Power BI (youtube.com)
else another dax function that may come in handy: PERCENTILE.INC function (DAX) - DAX | Microsoft Learn
usage shown here : PERCENTILE.EXC, PERCENTILE.INC, PERCENTILEX.EXC, PERCENTILEX.INC - DAX Guide (youtube.com)
if this doesn't resolve the issue, kindly provide sample input and output data masking sensitive information and in a usable format ( table, excel etc.)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
105 | |
98 | |
65 | |
54 |