Forum Discussion
column number sequence reversal
- 2 years ago
Hi cheezy -Can you please try the below code , i have checked with the above data shared
getting the required output as expected
Measure:
Required =
VAR MaxSequence = CALCULATE(MAX('YourTable'[Audit_Sequence]), ALLEXCEPT('YourTable', 'YourTable'[ID]))RETURNMaxSequence-MAX('YourTable'[Audit_Sequence]) +1Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Hi cheezy -Create a calculated column to achieve the required sequence for the expected column
Required =
VAR MaxAudit = MAX(AuditData[MostRecentAudit])
RETURN
MaxAudit - AuditData[MostRecentAudit] + 1
replace the table name and columns as per your table/model references.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
that doesnt quite work
VAR MaxAudit = MAX(AuditData[Audit_Sequence]) would return 6 as in my example above as applies to all ID's
How can i filter this based on ID? ie max should be 4 for ID 1 , 2 for ID 2 and 6 for ID3 ?