Forum Discussion

EMaker's avatar
EMaker
Regular Visitor
1 year ago
Solved

IF OR Dax Measure

Hi,

 

Does anyone know how I can write the below Excel formula into a DAX Measure i'm struggling to select information for Column D2 

as it keeps providing a function instead of the column. 

=IF(OR(I2>=D2),0,5*E2)

 

Thanks E

  • Hello EMaker,

     

    Can you please try this approach:

    CalculatedMeasure = 
    IF(
        OR(
            MAX(Table[I]) >= MAX(Table[D]),
            ISBLANK(MAX(Table[D]))         
        ),
        0,                                  
        5 * MAX(Table[E])                   
    )
    

2 Replies

  • Hello EMaker,

     

    Can you please try this approach:

    CalculatedMeasure = 
    IF(
        OR(
            MAX(Table[I]) >= MAX(Table[D]),
            ISBLANK(MAX(Table[D]))         
        ),
        0,                                  
        5 * MAX(Table[E])                   
    )
    
  • EMaker 

    If you're trying to create a DAX measure:

    Measure Formula = 
    SUMX(
    YourTable,
    IF(
    OR(YourTable[I] >= YourTable[D], FALSE),
    0,
    5 * YourTable[E]
    )
    )

    If you want to create a calculated column:

    Calculated Column Formula = 
    IF(
    OR(YourTable[I] >= YourTable[D], FALSE),
    0,
    5 * YourTable[E]
    )

    💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
    Cheers,
    Kedar
    Connect on LinkedIn