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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Solution Sage
Solution Sage

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors