Forum Discussion

TCavins's avatar
TCavins
Helper V
6 years ago
Solved

Alerts - Value Based or Row Level Security

I have a set of data that has a column for Y/N. If the count of Y's > 0, I'm going to set off an alert. However, I want the alerts to go to specific people depending on the value in another column. A...
  • v-alq-msft's avatar
    6 years ago

    Hi, TCavins 

     

    I'd like to suggest you use Data alerts in the Power BI service . I created data to reproduce your scenario.

    Table:

     

    You may create a measure for each category as below.

    CountAlertA = 
    var _retult = 
    CALCULATE(
        COUNTROWS(
            FILTER(
                ALL('Table'),
                'Table'[Category] = "A"&&
                'Table'[AlertTrigger] = "Y"
            )
        )
    )
    return
    IF(
        ISBLANK(_retult),
        0,
        _retult
    )
    CountAlertB = 
    var _result = 
    CALCULATE(
        COUNTROWS(
            FILTER(
                ALL('Table'),
                'Table'[Category] = "B"&&
                'Table'[AlertTrigger] = "Y"
            )
        )
    )
    return
    IF(
        ISBLANK(_result),
        0,
        _result
    )
    CountAlertC = 
    var _result = 
    CALCULATE(
        COUNTROWS(
            FILTER(
                ALL('Table'),
                'Table'[Category] = "C"&&
                'Table'[AlertTrigger] = "Y"
            )
        )
    )
    return
    IF(
        ISBLANK(_result),
        0,
        _result
    )
    CountAlertD = 
    var _result = 
    CALCULATE(
        COUNTROWS(
            FILTER(
                ALL('Table'),
                'Table'[Category] = "D"&&
                'Table'[AlertTrigger] = "Y"
            )
        )
    )
    return
    IF(
        ISBLANK(_result),
        0,
        _result
    )
    CountAlertF = 
    var _result = 
    CALCULATE(
        COUNTROWS(
            FILTER(
                ALL('Table'),
                'Table'[Category] = "F"&&
                'Table'[AlertTrigger] = "Y"
            )
        )
    )
    return
    IF(
        ISBLANK(_result),
        0,
        _result
    )

     

    Then you may use card visuals to display the results and publish th report to service. You need to pin them to the dashboards and set an alert for each pinned visual. 

     

    You may set alert rules and click 'Use Microsoft Power Automate to trigger additional actions' to send an email to corresponding user.

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.