Forum Discussion
How do i sort a column with duplicate values by another column
- 9 years ago
Thanks Angelia,
That fixed the calculated column however when i try to sort the 'taskname' column by it i get the following error
"This column cant be sorted by a column that is already sorted, directly or indirectly by this column"
I've actually implemented a workaround by concatenating the 'TaskIndex' and 'TaskName' values and sorting by this instead. So now i have..
ID1 Establish routine
ID2 Set Trap
ID3 Drop Anvil
ID4 Chug a beer
It's not ideal as i would prefer the task ID not to display in the visual however at this stage its a cosmentic issue rather than a functional one.
Thanks anyway for your efforts
Kind regards
Alex
Hi acretney,
I edit the reply, as Vvelarde posted, please remove the ) as follows. And check if it works fine.
MaxDate =
VAR currentTaskName = 'Table1'[TaskName]
RETURN
CALCULATE (
MAX ( 'Table1'[Date] ),
FILTER ( ALL ( Table1 ), 'Table1'[TaskName] = currentTaskName
)
Thanks,
angelia
Hi, Since 'calculate' doesn't work for calculated columns in direct query mode, how can I try this in direct query mode?