Forum Discussion

John2's avatar
John2
Frequent Visitor
2 years ago
Solved

DAX formula help needed

I have a table called patch which has computer id, patch name, compliant count with values 0,1. The table has details of various ids, the patches associated with each of them and if they are complian...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi John2 ,

    The legend only accepts entity columns/calculated columns as values.
    Please try new a calculated column first:

    Table = 
    SUMMARIZE (
        'patch',
        'patch'[computer id],
        "Compliant_%",
            VAR compliant_count =
                SUM ( patch[Compliant Count] )
            VAR applicable_system_count =
                COUNTROWS ( patch )
            RETURN
                DIVIDE ( compliant_count, applicable_system_count, 0 )
    )

     and new a calculated column by use [Compliance_catergory] code:



    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group