Forum Discussion
Columns not aligning unless aggregated
I am trying to put a column in my table that has a 1:1 relationship between its query and the query that houses the other columns in my table. Whenever I put the column in it does a complete table join and does not align the data. However when I put an aggrate function on the column such as "Sum" the data aligns. Any idea as to why this may be?
My desired output was to have the CustProdRep column and the Expected revenue column to be populated in both columns of row. The only way I was able to do this was by aggregating one of the columns by appling a function such as sum or count. I ended up resolving this issue by writing a SQL statement that did what I wanted so nothing had to be done in BI.
4 Replies
- Greg_DecklerCommunity Champion
Is the example that you are showing where it "aligns" or does not align? I'm not completely sure I understand what you mean by that.
- rhbordersHelper I
The image on the left shows that it aligns when I do a sum on the column. The right image is when there is no aggregate function and they do not align. I do not want to have to do an aggregated function on the column so that I dont not have the extra result row.
- v-yulgu-msftMicrosoft Employee
Hi rhborders,
I waas not clear about your problem. What do you mean "Align"? From above two images, it looks like that column [Expected Revenue] in both of them are align (the diplayed position?). What is your desired output?
Regards,
Yuliana Gu
- rhbordersHelper I
My desired output was to have the CustProdRep column and the Expected revenue column to be populated in both columns of row. The only way I was able to do this was by aggregating one of the columns by appling a function such as sum or count. I ended up resolving this issue by writing a SQL statement that did what I wanted so nothing had to be done in BI.