Forum Discussion

anglefbi11's avatar
anglefbi11
Helper I
2 years ago
Solved

card for matrix visual

hi guys

i am facing a difficulty with adding card for a matrix visual

 

i created a matrix and the two values

one of them is count of alert

second is total percentge of row total

 

when i added card for the first value ( count of alert ) it works fine

 

but i dont know how to to add card for toatl of % ( the second value ) 

 

maybe i dont know how to explain it but you can see the below screen shot

 

 

in the pink card i need to show the total of % as shown below

 

 

 

 

 

for the matrix to show the percentage i choosed the below

 

 

 

 

 

 

 

kindly tell me what to do

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi anglefbi11 ,
    You can change the measure to something like this:

    Total ppercentage of alert = 
    VAR a = 
    CALCULATE(
        SUM('Table'[Alert]),
        ALL('Table')
    )
    RETURN
    SUM('Table'[Alert])/a

    Put in matrix and a card

     

    Best regards,
    Albert He

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

     

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi anglefbi11 ,
    Based on your description, my understanding is that you want to get the percentage of each alert in the total alert. Based on this understanding, you can create a measure
    Sample data

    Measure

    Total ppercentage of alert = 
    VAR a = 
    CALCULATE(
        SUM('Table'[Alert]),
        ALL('Table')
    )
    RETURN
    SELECTEDVALUE('Table'[Alert])/a

    Final output

    But if you follow the original idea, you can indeed use the steps you listed above, you just need to re-add a column of alert values to the matrix and set it up the way you did it

     

    Best regards,
    Albert He

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

     

     

    • anglefbi11's avatar
      anglefbi11
      Helper I

      hi

      thank you for your reply. no this is not my issue.

       

      my issue that i need to insert a card visual which will show the total of % 

       

      if you can see the blue card visual is working fine because the data is there in my excel data. but when i try to choose insert card visual for % nothing is showing because the % i created it based on the row total and there is no data in my original data set

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi anglefbi11 ,
        You can change the measure to something like this:

        Total ppercentage of alert = 
        VAR a = 
        CALCULATE(
            SUM('Table'[Alert]),
            ALL('Table')
        )
        RETURN
        SUM('Table'[Alert])/a

        Put in matrix and a card

         

        Best regards,
        Albert He

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

         

    • anglefbi11's avatar
      anglefbi11
      Helper I

      hi brother

       

      sorry for bothering  you

       

      can you asset me to write a new messure by doing the below

      i want to say ( take the number in blue row under header 50 ( 7 )  and devide it by  the total (5428) and * 100

       

      the above messure will solve my issue. because in my data set i dont have a column for this calculation .

       

      you can refer to the below image so you can understand what i mean. because if i did this messure i can add it in my card visual

       

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi anglefbi11 ,
        Thanks for the reply. You can try this MEASURE

         

        Percentage = 
        VAR a = 
        CALCULATE(
            MAX('Table'[Alert]),
            FILTER(
                'Table',
                'Table'[Name] = "A" && 'Table'[Number] = 1
            )
        )
        VAR b = 
        CALCULATE(
            SUM('Table'[Alert]),
            FILTER(
                'Table',
                'Table'[Name] = "A"
            )
        )
        RETURN
        a/b

         

        Final output


        This is a new question, and a post corresponding to an answer would allow other members with similar questions to get more accurate help. If the above suggestions don't solve your new problem.You can create a new post and a professional engineer will solve the problem for him.

         

        Best regards,
        Albert He