Forum Discussion
smpa01
3 years agoCommunity Champion
Ranking Issues 2
CNENFRNL AlexisOlson jeffrey_wang
I am trying to get a RANK column with WINDOW function. The end result is this with RANKX and without WINDOW function
I tried using WINDOW fu...
- 3 years ago
@jeffrey_wang I can see see the evaluation context of REL in DAX DEbug output with EVALUATEANDLOG
This is simply awesome
{ "expression": "WINDOW (\n -1,\n REL,\n 0,\n REL,\n SUMMARIZE ( tbl, tbl[yr], tbl[val] ),\n ORDERBY ( tbl[val] ),\n KEEP,\n PARTITIONBY ( tbl[yr] )\n )", "inputs": ["'tbl'[yr]", "'tbl'[val]"], "outputs": ["'tbl'[yr]", "'tbl'[val]"], "data": [ { "input": [2022, 100], "rowCount": 1, "output": [ [2022, 100] ] }, { "input": [2022, 200], "rowCount": 2, "output": [ [2022, 100], [2022, 200] ] }, { "input": [2022, 300], "rowCount": 2, "output": [ [2022, 200], [2022, 300] ] }, { "input": [2023, -200], "rowCount": 1, "output": [ [2023, -200] ] }, { "input": [2023, -100], "rowCount": 2, "output": [ [2023, -200], [2023, -100] ] } ] }
smpa01
3 years agoCommunity Champion
@jeffrey_wang I can see see the evaluation context of REL in DAX DEbug output with EVALUATEANDLOG
This is simply awesome
{
"expression": "WINDOW (\n -1,\n REL,\n 0,\n REL,\n SUMMARIZE ( tbl, tbl[yr], tbl[val] ),\n ORDERBY ( tbl[val] ),\n KEEP,\n PARTITIONBY ( tbl[yr] )\n )",
"inputs": ["'tbl'[yr]", "'tbl'[val]"],
"outputs": ["'tbl'[yr]", "'tbl'[val]"],
"data": [
{
"input": [2022, 100],
"rowCount": 1,
"output": [
[2022, 100]
]
},
{
"input": [2022, 200],
"rowCount": 2,
"output": [
[2022, 100],
[2022, 200]
]
},
{
"input": [2022, 300],
"rowCount": 2,
"output": [
[2022, 200],
[2022, 300]
]
},
{
"input": [2023, -200],
"rowCount": 1,
"output": [
[2023, -200]
]
},
{
"input": [2023, -100],
"rowCount": 2,
"output": [
[2023, -200],
[2023, -100]
]
}
]
}