Forum Discussion

matts29's avatar
matts29
Frequent Visitor
2 years ago
Solved

division/percentage

Hi 

Can someone help please?

 

I have a column (column a) contains rows of the value = 1 or 2 or 3. I would like to have the percentage displayed in a card where Column a ( equals 2 and 3) / Column A (count of all the numbers in this column)

 

Thanks

πŸ™‚

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi matts29 

     

    Try the following dax

    Percentage of 2 and 3 = 
    DIVIDE(
        COUNTROWS(FILTER('Table', 'Table'[value] = 2 || 'Table'[value] = 3)),
        COUNTROWS('Table'),
        0
    ) * 100
    

     

     

    This is the result you want

     

     

     

     

    Best Regards,

    Jayleny

     

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

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi matts29 

     

    Try the following dax

    Percentage of 2 and 3 = 
    DIVIDE(
        COUNTROWS(FILTER('Table', 'Table'[value] = 2 || 'Table'[value] = 3)),
        COUNTROWS('Table'),
        0
    ) * 100
    

     

     

    This is the result you want

     

     

     

     

    Best Regards,

    Jayleny

     

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