Forum Discussion

AndrewPF's avatar
AndrewPF
Helper V
3 years ago
Solved

radar (spider) chart with two measures from same data source

I am using the SpiderChart by visiochart to show scores across different security factors for two different companies. 

 

However, these scores are currently hard coded and I want the chart to show scores based on user input as follows: 


where I have measures of "score 1" and "score 2" based on slicers "company 1" and "company 2". 

 

Is this possible? 

  • Hi AndrewPF ,

    If you mean select two values in the company slicer, score1 for the first and score2 for the second, modify the formula to:

    score 1 =
    CALCULATE (
        SUM ( 'Factors'[score] ),
        'Factors'[company]
            = MINX ( ALLSELECTED ( Factors[company] ), 'Factors'[company] )
    )
    
    score 2 =
    CALCULATE (
        SUM ( 'Factors'[score] ),
        'Factors'[company]
            = MAXX ( ALLSELECTED ( Factors[company] ), 'Factors'[company] )
    )
    

    Get the same result with the hard coding formula:

    I attach my sample below for your reference.

     

    Best regards,

    Community Support Team_yanjiang

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

     

4 Replies

  • Hi AndrewPF ,

    I'm not quite clear what's the data structure your modle is. I create a sample:

    But seems it's not quite the same with yours. Please clarify more details.

     

    Best regards,

    Community Support Team_yanjinag

  • Hi, 

    the structure of the data is as follows: 

     

    companyfactorscore
    Company A         cubit28.43
    Company A         patching19.91
    Company A         app_security62.38
    Company A         dns77.68
    Company A         network45.36
    Company A         social_eng88.14
    Company A         leaked_info98.09
    Company A         ip_rep50.84
    Company A         hacker38.09
    Company A         endpoint21.06
    Conglomerate B         cubit97.86
    Conglomerate B         patching80.66
    Conglomerate B         app_security23.45
    Conglomerate B         dns15.25
    Conglomerate B         network58.67
    Conglomerate B         social_eng7.83
    Conglomerate B         leaked_info17.57
    Conglomerate B         ip_rep46.16
    Conglomerate B         hacker9.3
    Conglomerate B         endpoint81.35
    Consortium C         cubit79.36
    Consortium C         patching10.43
    Consortium C         app_security29.81
    Consortium C         dns65.31
    Consortium C         network26.07
    Consortium C         social_eng50.67
    Consortium C         leaked_info81.28
    Consortium C         ip_rep57.27
    Consortium C         hacker37.2
    Consortium C         endpoint33.2


    and my two measures are: 

    score 1 = calculate(sum('Factors'[score]), 'Factors'[company] = "Company A")


    and

    score 2 = calculate(sum('Factors'[score]), 'Factors'[company] = "Conglomerate B")


    but I want to create score 1 and score 2 based on slicers for end-user input instead of hard coding them.

    • v-yanjiang-msft's avatar
      v-yanjiang-msft
      Community Support

      Hi AndrewPF ,

      If you mean select two values in the company slicer, score1 for the first and score2 for the second, modify the formula to:

      score 1 =
      CALCULATE (
          SUM ( 'Factors'[score] ),
          'Factors'[company]
              = MINX ( ALLSELECTED ( Factors[company] ), 'Factors'[company] )
      )
      
      score 2 =
      CALCULATE (
          SUM ( 'Factors'[score] ),
          'Factors'[company]
              = MAXX ( ALLSELECTED ( Factors[company] ), 'Factors'[company] )
      )
      

      Get the same result with the hard coding formula:

      I attach my sample below for your reference.

       

      Best regards,

      Community Support Team_yanjiang

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