Forum Discussion

harshadrokade's avatar
harshadrokade
Icon for Post Partisan rankPost Partisan
4 years ago
Solved

Get data from other table in pie chart

HI Experts,   Need help on below query.   I have 2 tables as below   Table1 (All students) Student id Student name Manager name   Table2 (Only those Students who have not completed the tra...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  harshadrokade ,

    I created some data:

    Table1:

    Table2:

    Here are the steps you can follow:

    1. Create measure.

    not completed the training =
    var _select=SELECTEDVALUE('Table2'[Training name])
    return
    COUNTX(FILTER(ALL('Table2'),'Table2'[Training name]=_select),[Student id])
    completed the training =
    var _select=SELECTEDVALUE('Table2'[Training name])
    return
    COUNTROWS('Table1 (All students)') - COUNTX(FILTER(ALL(Table2),'Table2'[Training name]=_select),[Student id])

    2. Result:

     

    If you need pbix, please click here.

     

    Best Regards,

    Liu Yang

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