Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys,
I have dataset containing three columns
- Department
- Timestamp
- NbrOfCustomers
From this table I would like to compute another table containtng the 90-th percentiles of NbrOfCustomers for each Department. It has to be a proper table as I am to use it in further calcualtions. I have tried the following DAX formula
GROUPBY(MyDataset; MyDataset[Department]; "90th Percentile"; PERCENTILEX.INC(CURRENTGROUP(); MyDataset[NbrOfCustomers]; 0,9))
which works like a charm when using SUMX, AVERAGEX etc as expression. But for some reason it does not work with the PERCENTILEX. I get the following error message
"Function 'GROUPBY' scalar expressions have to be Aggregation functions over CurrentGroup(). The expression of each Aggregation has to be either a constant or directly reference the columns in CurrentGroup()."
Why is this?
Hi @Majfah,
From this document, we can see that:
"The CURRENTGROUP function takes no arguments and is only supported as the first argument to one of the following aggregation functions: AverageX, CountAX, CountX, GeoMeanX, MaxX, MinX, ProductX, StDevX.S, StDevX.P, SumX, VarX.S, VarX.P." PERCENTILEX is not a supported function to be used inside CURRENTGROUP() function.
Regards,
Yuliana Gu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |