Forum Discussion

haniizz_derar20's avatar
haniizz_derar20
New Member
3 years ago
Solved

Need you help with this chart

Hi All   how can I vesualize this data in power bi to have the same visual in the picture   index intention to return possibility to return 1 Yes No 2 Yes Yes 3 No No 4 No...
  • ddpl's avatar
    3 years ago

    haniizz_derar20 try below

     

    First you need to unpivot the last column as per below from power query.

     

    -

     there is two way

    1. cluster bar chart create measure as per below

    Measure = 
    VAR _A=
        COUNT('Table'[index])
    VAR _B =
        CALCULATE ( COUNT('Table'[index]), ALLSELECTED('Table'[Value]) )

    RETURN
        DIVIDE ( _A, _B )

    then plot into chart

    2.create stacked bar chart without create any measure direcltly plot in to chart as per below

     

  • themistoklis's avatar
    3 years ago

    haniizz_derar20 

     

    You should unpivot the table first using Power Query.

     

    Select the fields intention to return and possibility to return, right click on them and unpivot columns.

     

    Then create a % share measure using the following formula:

    % Share = 
    VAR Volume =
        COUNT(Sheet1[index])
    VAR AllVolume =
        CALCULATE ( COUNT(Sheet1[index]),ALLSELECTED(Sheet1) )
    
    RETURN
        DIVIDE ( Volume, AllVolume )
    

     

    Finally create the graph.

     

    PowerBI workspace attached

     

  • haniizz_derar20's avatar
    3 years ago

    thank you ddpl for your reply

    can I know the measure that you used in the previous example ? 

    and how can I get the same chart as in my question ?

     

    thanks again