Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have data like below
ID Status
1 Requested
1 Approved
2 Requested
3 Requested
1 Closed
3 Approved
i want to add one more column which will add a bit 0/1 in front of each row if that id is approved. like below
ID Status isApproved
1 Requested YES
1 Approved YES
2 Requested NO
3 Requested YES
1 Closed YES
4 Requested NO
3 Approved YES
Please help. using DAX.
Solved! Go to Solution.
Hi,
This calculated column formula works
=if(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Status]="Approved"))>0,"Yes","No")
Hope this helps.
Hi,
This calculated column formula works
=if(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[ID]=EARLIER(Data[ID])&&Data[Status]="Approved"))>0,"Yes","No")
Hope this helps.
What logic you want to apply on this new column ?
I want to apply the logice that if id 1 is having approved entry then mark this new column as yes. same for each id.
That's not clear. You have ID's where the Status is not Approved, but they have Yes?
Phil
Proud to be a Super User!
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |