We have the following data.
TestName Stage1 Stage2 Stage3 Stage4
Test1 John Calra John Calre
Test2 Calra null John Calra
We need to implement a query which show data in below format.
User Stage1count Stages2Count Stages3count Stages4Count
John 1 0 2 0
Calra 1 1 0 2
Thanks
John
You could use a
unionto normalize the data. After that, a regularpivotstrategy will work: