Forum Discussion
jfmejiav1
7 years agoFrequent Visitor
create a conditional flag
Hello, Currently y have a table with snapshot of deals the date of the snapshot and if in that date the deal had a flag or not. ( see below) I want to create a column that puts the f...
- 7 years ago
Hi jfmejiav1,
Try this for your new calculated column, where Table1 is the table you show:
NewCol = CALCULATE ( MIN ( Table1[SnapDate] ), Table1[Flag] = 1, ALLEXCEPT ( Table1, Table1[Deal iD] ) )or this (I'm not quite sure which one you need):
NewCol = VAR _Date = CALCULATE ( MIN ( Table1[SnapDate] ), Table1[Flag] = 1, ALLEXCEPT ( Table1, Table1[Deal iD] ) ) RETURN IF ( Table1[SnapDate] = _Date, _Date )
AlB
Community Champion
7 years agoHi jfmejiav1,
Try this for your new calculated column, where Table1 is the table you show:
NewCol =
CALCULATE (
MIN ( Table1[SnapDate] ),
Table1[Flag] = 1,
ALLEXCEPT ( Table1, Table1[Deal iD] )
)
or this (I'm not quite sure which one you need):
NewCol =
VAR _Date =
CALCULATE (
MIN ( Table1[SnapDate] ),
Table1[Flag] = 1,
ALLEXCEPT ( Table1, Table1[Deal iD] )
)
RETURN
IF ( Table1[SnapDate] = _Date, _Date )