Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |