Forum Discussion

cghanta's avatar
cghanta
Helper I
1 year ago
Solved

Percentage from Text Columns

I have 2 questions.  I need to create 2 measures from text columns and display as cards ignoring the slicer. I have a table UPS, it has a Location colum and Maintenance Bypass column (Text) & Du...
  • Akash_Varuna's avatar
    1 year ago

    Hi cghanta Try these please 

    Measure1 = 
    VAR TotalLocations = COUNTROWS(ALL(UPS))
    VAR NoMaintenanceBypass = COUNTROWS(
        FILTER(ALL(UPS), UPS[Maintenance Bypass] = "No")
    )
    RETURN
    DIVIDE(NoMaintenanceBypass, TotalLocations, 0) * 100
    Measure2 = 
    VAR TotalLocations = COUNTROWS(ALL(UPS))
    VAR WithDualUPS = COUNTROWS(
        FILTER(ALL(UPS), UPS[Dual UPS] = "Yes")
    )
    RETURN
    DIVIDE(WithDualUPS, TotalLocations, 0) * 100