Forum Discussion

hummingbird's avatar
hummingbird
Helper II
2 years ago
Solved

Fault Percentage per Order

Hey,   I've got two tables that are interconnected by Order ID.   Table 1 contains all order information and Table 2 has 3 columns: Order ID, Fault Type and Fault Percentage. There can be multipl...
  • Fowmy's avatar
    Fowmy
    2 years ago

    hummingbird 

    Add the order number from Table1 to a table visual and the following measure:

     

    Fault Measure = 
    VAR __SumFault = SUM('Table2'[Fault Percentage])
    VAR __Result = 
        SWITCH(
            TRUE(),
            __SumFault <=  0.4 ,  "Green",
            __SumFault >  0.4 && __SumFault <=  0.5 ,  "Amber",
            "Red"
        )
    RETURN
        __Result