Forum Discussion

Basil2023's avatar
Basil2023
New Member
3 years ago
Solved

KPI Donut Chart

Hi There, 

 

Im new to PowerBI and looking for some help with PayPal KPI Donut ChartI am trying to link multiple tables of the same field into the KPI Donut Chart and then filter by Year slicer.

 

The KPI Donut chart doesnt seem to allow me to assign multiple tables by dragging in the normal way. It only shows 1 field from 1 table. I do seem to have linked the year slicer to the Donut Chart though.

 

The Year slicer is reading from an appended table of Year values from each table, leaving only 3 options; 2021, 2022, 2023

 

The result is that the chart shows values for Survey 2021 only and doesnt change when I click on 2022, 2023 values in the Year slicer. I would like the donut chart to show different values per year.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Tree structure showing each table linked by Employee Name in both directionsAny help much appreciated.

 

Basil2023

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Basil2023 ,

    Please try below steps:

    1. below is my test table

    Table:

    Table1:

    Table2:

    Table3:

    Model:

     

    2. create a measure with below dax formula

    Measure =
    VAR target = 80
    VAR cur_year =
        SELECTEDVALUE ( 'Table'[Year] )
    VAR tmp =
        UNION ( Table1, Table2, Table3 )
    VAR tmp1 =
        FILTER ( tmp, [Year] = cur_year )
    VAR _val =
        SUMX ( tmp1, [Sale] )
    RETURN
        DIVIDE ( _val, target )
    

    3. add a  visual with this measure and add a slicer with "Table[Year]" field

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Cant you union the 3 tables into in 1 table ? 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Basil2023 ,

    Please try below steps:

    1. below is my test table

    Table:

    Table1:

    Table2:

    Table3:

    Model:

     

    2. create a measure with below dax formula

    Measure =
    VAR target = 80
    VAR cur_year =
        SELECTEDVALUE ( 'Table'[Year] )
    VAR tmp =
        UNION ( Table1, Table2, Table3 )
    VAR tmp1 =
        FILTER ( tmp, [Year] = cur_year )
    VAR _val =
        SUMX ( tmp1, [Sale] )
    RETURN
        DIVIDE ( _val, target )
    

    3. add a  visual with this measure and add a slicer with "Table[Year]" field

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.