Forum Discussion
BenediktW
Advocate I
2 years agoInherit Values from previous rows
Dear Community, I am facing an issue regarding an inheriting logic. I have a table in my canvas environment (example attached with the key columns), which contains certain subcategories. Those ar...
- 2 years ago
"Subkategory 4" on the screenshot below sounds like the case you described, but it shows the expected values.
Can you share a sequence where it breaks?
Best Regards,
Alexander
BenediktW
Advocate I
2 years agoHi,
thank you very much already! That is working better than my approaches so far. Unfortunately, it can happen that the "MSCOP" Identifikator shows up multiple times per Subkategory.
barritown
Solution Sage
2 years agoOkay, try this modification then:
Result =
VAR CurrentSubcategory = [Subcategory column]
VAR CurrentIndex = [Index.1]
VAR InitialValue = MINX ( FILTER ( MyTable, [Subcategory column] = CurrentSubcategory ), [First Row value] )
VAR FinalValue = ABS ( MOD ( COUNTROWS ( FILTER ( MyTable, [Subcategory column] = CurrentSubcategory && [Index.1] >= CurrentIndex && [Inherit_Flag] = "MSCOP" ) ), 2 ) - InitialValue )
RETURN FinalValue
Best Regards,
Alexander
- BenediktW2 years ago
Advocate I
Works well, but when the first row value is 1 and there is an "MSCOP" Identificator. The following rows after that are staying one.
- barritown2 years ago
Solution Sage
"Subkategory 4" on the screenshot below sounds like the case you described, but it shows the expected values.
Can you share a sequence where it breaks?
Best Regards,
Alexander