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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Dax Help

Hi all,

I have a query as below

I have po number and BaseNumber columns 
If po number is not blank then it's considered as "Po Yes"
If po number is blank and base number for that blank record Po number is having Po issued before then it's "Po No IK"
If it's only blank and base number for that po number is not issued as Po issued before then it's "PO NO"

Below I am pasting example

PO NumberBaseNumPO Status
AAA123PO Yes
ABB243PO Yes
 123PO No NIK
ACC563PO Yes
 789PO NO
FCJ898PO Yes
 898PO No IK
 789PO NO


Po status should be my output

For row 3 PO num is blank but basenumber 123 is issued as Po issued before so it's considered PO NO IK

Please help 
thanks

1 ACCEPTED SOLUTION
DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

try this as a calculated column:

 

Column = if('Table'[PO Number]<>"", "PO Yes",if(CALCULATE(max('Table'[PO Number]),ALLEXCEPT('Table','Table'[BaseNum]))<>"", "PO No NIK","PO No"))
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

View solution in original post

2 REPLIES 2
DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

try this as a calculated column:

 

Column = if('Table'[PO Number]<>"", "PO Yes",if(CALCULATE(max('Table'[PO Number]),ALLEXCEPT('Table','Table'[BaseNum]))<>"", "PO No NIK","PO No"))
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Anonymous
Not applicable

Thanks a lot it helped !!

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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