Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am trying to do groupby()'s, and after do a "summarize" column, but currentgroup() doesn't work, otherwise if I use sumx() it works perfectly.
testTable = GROUPBY('tbl',Date[Year],Date[Month],'OS'[request.so],"X",PERCENTILEX.INC(CURRENTGROUP(),'tbl'[business_pause_duration],0.5))
Ps.: I can't use summarize because it are Table linked by relationships
Hi @Bidu
Whether you use GROUPBY or SUMMARIZE, you should be able to use ADDCOLUMNS to add a column computing the percentile (which will iterate over rows of Sales corresponding to each group).
Either of these should work:
testTable =
ADDCOLUMNS (
GROUPBY (
'tbl',
Date[Year],
Date[Month],
'OS'[request.so]
),
"X",
CALCULATE (
PERCENTILEX.INC (
Sales,
'tbl'[business_pause_duration],
0.5
)
)
)
testTable =
ADDCOLUMNS (
SUMMARIZE (
'tbl',
Date[Year],
Date[Month],
'OS'[request.so]
),
"X",
CALCULATE (
PERCENTILEX.INC (
Sales,
'tbl'[business_pause_duration],
0.5
)
)
)
It wasn't clear from your description why you can't use SUMMARIZE.
If needed, could you provide more detail on your data model and some sample data and expected outputs?
Regards
User | Count |
---|---|
59 | |
22 | |
18 | |
18 | |
16 |
User | Count |
---|---|
85 | |
54 | |
45 | |
39 | |
21 |