Count Failures in PowerBI

2019-09-07 12:57发布

问题:

I am developing a dashboard in Power Bi and I am trying to come up with a way by which I can indicate or count the number of "fail"s in the following column:

    **Status**      Column2      Column3    Column4
    success         data         numbers    email
    success         data         facts      email
    fail            data         figures    email
    success         moredata     science    email
    success         somuchdata   magic      email
    success         stuff        etc        email
    success         things       etc        email

The first problem is that in some cases, all of the values in the column will be "success". So I can't just do a visual level filter... I believe I am in need of some kind of measure using DAX... I have tried most of the count functions, but none of them seem to work.

Then end goal is to be able to show whether or not I have any failures in that column and then if I do, I want to be able to drill down to that row and pull up the email (or user ID or other info) pertaining to that particular row.

回答1:

You can create a measure to count the rows with status fail.

Count of fails = COUNTROWS(FILTER(Table,[Status]="fail"))

Then you can use it in any visualization and drill down to get the email in the row level.

Let me know if this helps.



标签: powerbi dax m