Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello i need some help in creating a column that identifies an "req"
Identification criteria = Type in {"req"} and Compliance in {"Yes","#TBD#"}
but i want to flag it only for the first apperence of the UniqueID
ID UniqueID Type Compliance Req(Flag)
1 aa req No 0
2 bb eer Yes 0
3 cc her #TBD# 0
4 dd req Yes 1
4 dd req Yes 0
4 dd req Yes 0
7 ss eer No 0
8 ff req #TBD# 1
8 ff req #TBD# 0
I thought of something like this:
Req(Flag) =
VAR _Type = IF(Table1[Type] in {"req"},1,0)
VAR _Compliance = IF(Table[Compliance] in {"Yes", "#TBD#"},1,0)
VAR _UniqueID = ??
RETURN IF(_Type && _Compliance && _UniqueId,1,0)
I know that EARLIER function might be a solution but couldn't find something that works and
i'm not sure if i'm using it corectly.
Also, the rows contains diffrent information too and i can't just remove the others
Can anybody help me, please?
@uif19085 , this seems like simple, unless you want the same flag for id
If([Type] in {"req"} && [Compliance] in {"Yes","#TBD#"},1,0)
Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
@amitchandak The VAR _UniqueID is the one that i need. If im not using this filter the table would look like this:
ID UniqueID Type Compliance Req(Flag)
1 aa req No 0
2 bb eer Yes 0
3 cc her #TBD# 0
4 dd req Yes 1
4 dd req Yes 1
4 dd req Yes 1
5 ss eer No 0
8 ff req #TBD# 1
8 ff req #TBD# 1
Even the normal ID it repeats i forgot this detail