Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Count entries in 2 different columns

I'm wondering how I would go about calculating this. I want to know how many properties we have Parking Rate information for, regardless of whether it's reserved parking rates or unreserved.   In t...
  • AlB's avatar
    7 years ago

    Hi Anonymous

     

    Try this where Table1 is the table you show:

     

     

    Measure =
    COUNTROWS (
        FILTER (
            Table1,
            OR (
                Table1[Unreserved Parking] <> BLANK (),
                Table1[Reserved Parking] <> BLANK ()
            )
        )
    )

     

    to count the number of properties that have info on either type of parking or this measure to calculate the percentage you talk about:

     

    Measure2 =
    DIVIDE (
        COUNTROWS (
            FILTER (
                Table1,
                OR (
                    Table1[Unreserved Parking] <> BLANK (),
                    Table1[Reserved Parking] <> BLANK ()
                )
            )
        ),
        COUNTROWS ( Table1 )
    )

    Code formatted with