I have gone through multiple questions on the community and noticed that many of them have insufficient information,
Now if the question is lacking the information, the asker will have to wait longer and will also have to answer many queries if they want a solution.
So if you are asking a question please try to include following things:-
1. A sample Dataset of your data which contains at-least 1 or preferable 3 different values of your primary field.
2. The Output which you are getting.
3. The expected output.
4. The set expression you are using or the script you are using.
5. For secrecy you can change your Field Names to Dimension-1, Dimension-2, and so on and same can go for measures.