Forum Discussion

AlanBaker's avatar
AlanBaker
Frequent Visitor
9 years ago
Solved

Calculations with Multiple Tables and Multiple RELATED Filters

This probably quite straightforward but I am a new DAX & Power BI User and I have been struggling with the need to create a Measure calculation on a Look up table that references Measures from two di...
  • v-ljerr-msft's avatar
    v-ljerr-msft
    9 years ago

    Hi AlanBaker,

     

    According to your description above, you should be able to use the formulas below to create three measures and show each of them on the Card visual on the report in your scenario. :smileyhappy:

    WOsNO_BREAK_IN = 
    SUMX (
        'Work Orders',
        IF (
            CALCULATE ( SUM ( Plans[Plan Hours] ) ) = 0
                && CALCULATE ( SUM ( Hours[Actual Hours] ) ) > 0,
            1,
            0
        )
    )
    
    WOsNO_NO_ACTION = 
    SUMX (
        'Work Orders',
        IF (
            CALCULATE ( SUM ( Plans[Plan Hours] ) ) > 0
                && CALCULATE ( SUM ( Hours[Actual Hours] ) ) = 0,
            1,
            0
        )
    )
    
    WOsNO_ACTIONED = 
    SUMX (
        'Work Orders',
        IF (
            CALCULATE ( SUM ( Plans[Plan Hours] ) ) > 0
                && CALCULATE ( SUM ( Hours[Actual Hours] ) ) > 0,
            1,
            0
        )
    )
    

     

    Regards