Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 training)
Student id
Training name
I want to create a pie chart which will show break up of students from Table 1 that have completed the training vs not completed a specific training. There will be slicer based on the Trainingname from Table 2
How to bring all this data together so that I
Solved! Go to Solution.
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
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
@harshadrokade if both tables have one row per student (as in the student id column is a unique identifier) then regardless your issues, best practice to merge them to one table (and this is of course will make your solve your requirement easily).
Is this the situation?
Let me know if you need help.
Thanks @SpartaBI for your reply.
The Table 1 is the complete table where all students are listed & only one entry provided for a student
But the Table 2 is having only those students who have not completed the trainings . Also the Table 2 can have one student multiple times as there I also have training name column. If a student didnt complete multiple trainings, he will be listed multiple times in Table 2 but the Table 1 will have his name only once. Thats why I am unable to merge the data, can I still merge the data in new table & use it in pie chart?
@harshadrokade in this case, then keeping them split is the right choice like you did. Do you want to do a quick zoom and show me your scenario?
Thanks for the reply again. Not allowed to upload pbix file or zoom call with student info 🙂
@harshadrokade maybe you could create a fake sample PBIX that we could look together in zoom so then you could see how to do that on your file
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
81 | |
65 | |
62 |
User | Count |
---|---|
147 | |
116 | |
104 | |
88 | |
65 |