Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
RohithGn
Helper I
Helper I

Check multiple rows and compare them on condition

Hi All,

 

I am stuck on creating a calculated column. My table has an SR ID, Bug ID and Bug States. An SR ID could have multiptle Bugs with their respective states. My table looks like below - 

 

SR IDBug IDBug StateFinal State
1aActiveActive
2bResolvedActive
3cResolvedActive
4dResolvedResolved
5eResolvedResolved
6fResolvedResolved
7aActiveActive

 

I need to create the column Final State where I have to check all the Bug states for an SR ID and if any of the bug state for an SR ID is Active then it the result is Active but if an SR has all the bug states as Resolved then it should be Resolved.

 

any help is appreciated.

 

Regards,

Rohith

1 REPLY 1
az38
Community Champion
Community Champion

Hi @RohithGn 

try new measure

 

Measure = if(COUNTROWS(filter(ALL('Table');AND('Table'[Final State]="Active";'Table'[SR ID]=SELECTEDVALUE('Table'[SR ID]))))>0;"Active";"Resolved")

do not hesitate to kudo useful posts and mark solutions as solution

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.