Forum Discussion

PaulHallam's avatar
PaulHallam
Icon for Helper III rankHelper III
7 years ago
Solved

Can i count values within a measure?

Hi I am new to the forum so apologise if this is a little garbled. Basically I need to know the count of values in different ranges within a measure….i think. I have a data table as below and have ...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi PaulHallam ,

    Please create a table with decimal value of range start and end, then you can use following measure to summarize and look correspond records and get count of them.

    Measure formula:

     

    Summary Count =
    VAR temp =
        SUMMARIZE (
            'Sample',
            [Sensor Number],
            "Count", [Occupied Days],
            "Percent", [Occupied %]
        )
    RETURN
        COUNTROWS (
            FILTER ( temp, [Percent] >= MAX ( T4[Start] ) && [Percent] <= MAX ( T4[End] ) )
        ) + 0
    

     

    Regards,

    Xiaoxin Sheng