Thanks for the reply from lbendlin , please allow me to provide another insight:
Hi, @Shraddha_sathe
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2.Add the index column to the powerquery:
3.Create calculated column references:
4.Here's my final result, which I hope meets your requirements.
5.Here are some posts that are similar to your problem:
Solved: How do I replace duplicates values with zero in a ... - Microsoft Fabric Community
Solved: Group by ID Skip Aggregation - Microsoft Fabric Community
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.