Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

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

  • 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 👍

2 Replies

  • DOLEARY85's avatar
    DOLEARY85
    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's avatar
      Anonymous
      Not applicable

      Thanks a lot it helped !!