Forum Discussion
luis_pflucker
Helper II
5 years agohow to group rows with calculated columns
Hi, I have a table with calculated columns as you see in the attached picture, I am trying to group in same row for example Defect ID 32013, 32026, 32053, etc where as a result the column #TCs Bloc...
luis_pflucker
Helper II
5 years agoI tried with:
Column = RANKx(all('All Defects (2)'[Defect number]),'All Defects (2)'[ATRKBlockedCOL])
Where Defect number = Defect ID and ATRKBlockedCOL is #TCs Blocked
MPMP
5 years agoFrequent Visitor
Try using the below dax measure:
RANKX(
RANKX(
FILTER(
'Table Name',
'Table Name'[Column Name1] = EARLIER('Table Name'[Column Name1])
),
'Table Name'[Column Name2],,DESC,Dense
)
The above measure will group your records and assigns rank inside the group
The above measure will group your records and assigns rank inside the group
- luis_pflucker5 years ago
Helper II
Hi, you mean:
Column = RANKx(filter('All Defects (2)','All Defects (2)'[Defect number]= earlier ('All Defects (2)'[Defect number])),'All Defects (2)'[ATRKBlockedCOL],,DESC,dense).See attached what I got.- MPMP5 years agoFrequent Visitor
You need to create another column and get the MaxRank in each group, if the max rank = 0 then 'N' if the max rank =1 then 'Y'
- MPMP5 years agoFrequent Visitor
Hi Luis,
I hope my solution helped you to achieve what you were looking for, could you please accept it as solution ?