Forum Discussion

nlakshmi's avatar
nlakshmi
Frequent Visitor
3 years ago
Solved

Conditional measure using a measure

Hello,

 

I need help to create a conditional measure from Quality OK column. The Quality OK column, the below table is a conditional measure based on a status column in the table - created as CALCULATE(COUNT(TP), STATUS = "OK"). Now, I need to create a new column in this table to show the MAX Date if Quality OK is not blank and "None" if it is blank. Also, Max Date is a measure on the date field in the table - created as MAX(Arrival Date).

 

 

Thank you!

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi nlakshmi,

    AFIAK, current power bi does not support one field return multiple data types, you need to convert these values to text to use these different data type value at the same time.
    You can try to use the following measure formula if suitable for your requirements:

    formula =
    IF ( [Quality OK] <> BLANK (), MAX ( Table[Max Date] ), BLANK () )

    Regards,

    Xiaoxin Sheng

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi nlakshmi,

    AFIAK, current power bi does not support one field return multiple data types, you need to convert these values to text to use these different data type value at the same time.
    You can try to use the following measure formula if suitable for your requirements:

    formula =
    IF ( [Quality OK] <> BLANK (), MAX ( Table[Max Date] ), BLANK () )

    Regards,

    Xiaoxin Sheng