Forum Discussion
New column flagged as first entry, second entry, or other.
- 9 years ago
Hi diegojustino,
According to your description, you should be able to use RANK.EQ Function (DAX) to create a calculate column to flag the entries in this scenario.
I assume you have a table called "Table1" like below.
1. Use the formula below to create a calculate column to get the number indicating which entry it should be.
Entry1 = VAR r = Table1[RO number] VAR c = Table1[Claim] VAR p = Table1[Performed] RETURN IF ( p = "Reparo", CALCULATE ( RANK.EQ ( c, Table1[Claim], ASC ), FILTER ( ALL ( Table1 ), Table1[RO number] = r && Table1[Performed] = p ) ) )2. Then use the formula below to flag the entry.
Entry2 = IF ( Table1[Entry1] = 1, "First Entry", IF ( Table1[Entry1] = 2, "Second Entry", IF ( Table1[Entry1] >= 3, "Third Entry or More" ) ) )Regards
Hi diegojustino,
According to your description, you should be able to use RANK.EQ Function (DAX) to create a calculate column to flag the entries in this scenario.
I assume you have a table called "Table1" like below.
1. Use the formula below to create a calculate column to get the number indicating which entry it should be.
Entry1 =
VAR r = Table1[RO number]
VAR c = Table1[Claim]
VAR p = Table1[Performed]
RETURN
IF (
p = "Reparo",
CALCULATE (
RANK.EQ ( c, Table1[Claim], ASC ),
FILTER ( ALL ( Table1 ), Table1[RO number] = r && Table1[Performed] = p )
)
)
2. Then use the formula below to flag the entry.
Entry2 =
IF (
Table1[Entry1] = 1,
"First Entry",
IF (
Table1[Entry1] = 2,
"Second Entry",
IF ( Table1[Entry1] >= 3, "Third Entry or More" )
)
)
Regards