Forum Discussion

e175429's avatar
e175429
Icon for Helper IV rankHelper IV
1 year ago
Solved

Creating Line Charts

Hello all,   I have survey data with 3 questions. In PowerBi, I need to recreate 3 line charts based on each question, like the ones below:   This chart is based on question "How satisfied were y...
  • Jihwan_Kim's avatar
    1 year ago

    Hi,

    Please check the below picture and the attached pbix file.

    In the attached file, I tried to select certain answers per each question, and then turn on Trend line feature in the format pane for each visualization.

     

     

     

     

    Q1 %: = 
    VAR _allresponse =
        CALCULATE (
            [Count response:],
            REMOVEFILTERS ( Question_fact[how satisfied were you with your response?] )
        )
    VAR _target = [Count response:]
    
    RETURN
        DIVIDE ( _target, _allresponse )

     

    Q2 %: = 
    VAR _allresponse =
        CALCULATE (
            [Count response:],
            REMOVEFILTERS ( Question_fact[how satisfied were you with our CX Team?] )
        )
    VAR _target = [Count response:]
    
    RETURN
        DIVIDE ( _target, _allresponse )

     

    Q3 %: = 
    VAR _allresponse =
        CALCULATE (
            [Count response:],
            REMOVEFILTERS ( Question_fact[Do you feel that our team answered your inquiry promptly?] )
        )
    VAR _target = [Count response:]
    
    RETURN
        DIVIDE ( _target, _allresponse )