Forum Discussion
Filter based on a value from a previous row
- 4 years ago
Hi Carlend ,
Can this meet your requirements?
Measure = VAR Count_ = CALCULATE ( COUNT ( 'Table'[N_Cicle] ), ALLEXCEPT ( 'Table', 'Table'[Recipe_Name], 'Table'[N_Cicle] ) ) VAR FirstIndex_ = IF ( Count_ > 1, CALCULATE ( MIN ( 'Table'[Index] ), ALLEXCEPT ( 'Table', 'Table'[Recipe_Name], 'Table'[N_Cicle] ) ), MIN ( 'Table'[Index] ) ) RETURN IF ( MIN ( 'Table'[Index] ) = FirstIndex_, 1 )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thanks for the help but this solution doesn't work because there is actually a third column with "different" values. I need to take only one of the rows creating a calculated column that allows me to say for example: if the value of N_Cicle is equal to the previous value of N_Cicle, return me one of the two. or something like that
- Carlend4 years agoFrequent Visitor
Sure, so.. i have:
Hi, i have a scenario like:
Recipe_Name N_Cicle MixTime Test1 2 157 Test1 2 189 Test1 1 132 Test1 0 140 Test2 3 145 Test2 3 158 Test2 2 135 Test2 1 128 Test2 0 133 And i want to filter N_Cicle column to obtain:
Recipe_Name N_Cicle MixTime Test1 2 157 Test1 1 132 Test1 0 140 Test2 3 145 Test2 2 135 Test2 1 128 Test2 0 133 - VahidDM4 years agoSuper User
Try this:
Table 2 = SUMMARIZE ( 'Table', 'Table'[Recipe_Name], 'Table'[N_Cicle], "MixTime", MIN ( 'Table'[MixTime] ) )Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
- Carlend4 years agoFrequent Visitor
It's not possibile to filter the same table without creating a new one?