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

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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