Forum Discussion
Anonymous
4 years agoNot applicable
Compare Rows
Hi all, I have the a table called "Plan" which looks like this: ResourceName Date Task Total Capacity Per Month A 1 January, 2022 A 147 A 1 February, 2022 B 147 B 1 March, ...
- 4 years ago
Anonymous , You need an index column for that. Add that in power query
new column in dax
if( [Index] = minx(filter(Table, [resourcename] = earlier([resourcename]) && [Date] = earlier([date]) ), [Index] ) ,[Total capacity per monnth], 0)
- Anonymous4 years ago
Thanks for this, but I am having a problem getting the index. I tried:
Index 1 = RANKX(Plan,Plan[Date],,ASC,Dense)Grand Index = RANKX (Plan,Plan[Index 1]+ RANKX ( Plan, Plan[ResourceName],, ASC, DENSE )* MAX ( Plan[Index 1] ),,ASC,DENSE)but because I dont have unique names or dates I can get a unique number for each row.
Anonymous
4 years agoNot applicable
Thanks for this, but I am having a problem getting the index. I tried:
Index 1 = RANKX(Plan,Plan[Date],,ASC,Dense)
Grand Index = RANKX (
Plan,
Plan[Index 1]
+ RANKX ( Plan, Plan[ResourceName],, ASC, DENSE )
* MAX ( Plan[Index 1] ),
,
ASC,
DENSE
)
but because I dont have unique names or dates I can get a unique number for each row.
Anonymous
4 years agoNot applicable
Instead of using DAX I just added the index in query and it worked.
Thanks