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
Hi all,
I'm trying to do a simple percentilex.inc calculation but the result is returning blank unless I manually select all the values I am grouping on.
The DAX is
PERCENTILEX.INC(VALUES(Table1[Group1]),[KPI],.5)
[KPI] is just a simple measure based on two integer fields
KPI = DIVIDE(
[KPI_Numerator],
[KPI_Denominator]
)
If I add a slicer and manually select all the group1 values then a result is shown, however if I "select all" in the slicer it returns to blank.
I have added a filer on the report so there are no blank or empty group1 values.
Any suggestions as to how I can resolve?
Solved! Go to Solution.
Thank you, you helped me get on the right track.
I got it working with
= PERCENTILEX.INC(
Summarize(
Facttable,
Table1[Group1])
),
[KPI],
0.5
)
I still have no idea why values acted as it did though.
Once I was happy it was workng I enhanced it to enable me to filter out smaller groups
KPI = PERCENTILEX.INC(
FILTER(
ALLSELECTED(Table1[Group1]),
[KPI_Denominator] >= 5
),
[KPI],
0.5
)
@itchyeyeballs , Try below method
Use ALL Function: Modify your DAX formula to use the ALL function to ignore any filters on Table1[Group1]. This can help in ensuring that the percentile calculation considers all values regardless of the slicer selection.
PERCENTILEX.INC(ALL(Table1[Group1]), [KPI], 0.5)
Check KPI Calculation: Ensure that the [KPI] measure is correctly calculated and does not return blank or error values. You can add a check to handle any potential division by zero or other issues:
KPI = IF(
ISBLANK([KPI_Denominator]) || [KPI_Denominator] = 0,
BLANK(),
DIVIDE([KPI_Numerator], [KPI_Denominator])
)
Debugging: Create a table visualization to display the values of Table1[Group1] and [KPI] to ensure that the data is as expected and there are no unexpected blanks or errors.
Proud to be a Super User! |
|
Thank you, you helped me get on the right track.
I got it working with
= PERCENTILEX.INC(
Summarize(
Facttable,
Table1[Group1])
),
[KPI],
0.5
)
I still have no idea why values acted as it did though.
Once I was happy it was workng I enhanced it to enable me to filter out smaller groups
KPI = PERCENTILEX.INC(
FILTER(
ALLSELECTED(Table1[Group1]),
[KPI_Denominator] >= 5
),
[KPI],
0.5
)
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 |
---|---|
21 | |
14 | |
11 | |
8 | |
5 |
User | Count |
---|---|
28 | |
21 | |
20 | |
13 | |
10 |