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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.