I am a PowerBI newbie and I have been playing with DAX functions, more specifically, the RANKX function. Here is my data set:
+----------+-------------------------------------+-----------------+----------+
| Category | Sub Category | Date | My Value |
+----------+-------------------------------------+-----------------+----------+
| A | A1 | 2018-01-01 | 2 |
| A | A2 | 2018-01-02 | 4 |
| A | A3 | 2018-01-03 | 6 |
| A | A4 | 2018-01-04 | 6 |
| B | B1 | 2018-01-05 | 21 |
| B | B2 | 2018-01-06 | 22 |
| B | B2 | 2018-01-07 | 23 |
| C | C1 | 2018-01-08 | 35 |
| C | C2 | 2018-01-09 | 35 |
| C | C3 | 2018-01-10 | 35 |
+----------+-------------------------------------+-----------------+----------+
And below is my code:
Rank all rows as Column =
RANKX(
'Table',
'Table'[My Value]
)
Unfortunately, I am getting the following error:
A single value for column 'My Value' in table 'Table' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
Any help would be greatly appreciated.
Thanks