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
saukulkarni22
Frequent Visitor

Get Status column based on another column status

Hi,

 

Wondering anyone can help me here please?

saukulkarni22_0-1678789040968.png

I am looking generate final status column based PO status and ID. If all PO status is Yes then final status will be Yes, all PO status is No then final status will be No PO, if mixed then returned as Partial for those ID. My PO status column is calulated column based on PO ref using power query.

 

Thanks

4 REPLIES 4
Aburar_123
Resolver IV
Resolver IV

Hi @saukulkarni22 ,

 

Please use the below calculated column,

 

Final_State =
 var a = CALCULATE(max('Table'[PO Status]),FILTER('Table','Table'[ID]=EARLIER('Table'[ID])))
  var b = CALCULATE(MIN('Table'[PO Status]),FILTER('Table','Table'[ID]=EARLIER('Table'[ID])))
  return if(a<>b,"Partial",a)

 

Hi,

 

Thanks for reply. But forgot to mention I am using direct query and calculate is not supported in direct query for calculated column DAX expression.

andhiii079845
Super User
Super User

I recommanded to bring this summerize status in a separate table with the ID column

IDFinal status
1YES
2Partial
3NO PO
  




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi,

 

This could work. Could you provide more details on this.

 

Thanks

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.