Forum Discussion

JunedS's avatar
JunedS
Frequent Visitor
2 years ago
Solved

Grouping

This is the sample data that I am having, now I want to group the activities based on their 'Basecode', 'Bucket Start Date', and 'Bucket End Date', and then calculate the average count of limits with...
  • amitchandak's avatar
    2 years ago

    JunedS , Based on what I got, You need a measures like

     

    Total Unique Limits =
    DISTINCTCOUNT('Table'[Limits])


    Count Above Limit =
    CALCULATE(
    COUNTROWS('Table'),
    'Table'[Limits] = "Above Limit"
    )

    Count Below Limit =
    CALCULATE(
    COUNTROWS('Table'),
    'Table'[Limits] = "Below Limit"
    )

    Count Within Limit =
    CALCULATE(
    COUNTROWS('Table'),
    'Table'[Limits] = "Within Limit"
    )


    Percentage Above Limit =
    DIVIDE(
    [Count Above Limit],
    [Total Unique Limits],
    BLANK()
    )

    Percentage Below Limit =
    DIVIDE(
    [Count Below Limit],
    [Total Unique Limits],
    BLANK()
    )

    Percentage Within Limit =
    DIVIDE(
    [Count Within Limit],
    [Total Unique Limits],
    BLANK()
    )