Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
jono
Frequent Visitor

Aggregation after simple many to one join, not working ?

Hi, I have done a very simple many to one join between two small tables fill with only test data (both directions).  The join seems to work fine but when I make a graph and chose count or sum or any other aggregation the total comes out wrong.  It seems not to be counting any duplicate rows for example if I click on Count, or Count distinct the answers will come out the same which is not correct as there are duplicates in the column.  Attached is a picture of a graph with counts and then a table which shows the entire joined data table.  To me the graph is not giving the right output as I have definitely selected Count and not Count distinctexample.PNG

 

3 REPLIES 3
jono
Frequent Visitor

The Tables look like pictures attached and the relationship is set up as attached as well.  Its very simple not much data, nothing to it but I cant work out why its not workingrelationship.PNGtable1.PNGtable2.PNG

jono
Frequent Visitor

As another piece of information when I merge the queries, (instead of just creating a relationship) it works perfectly.  I would have thought these two things would work the same way.  

 

Lastly when doing the relationship if I put a variable from the facttable on the x axis (and one from dimension table on the y axis) of the bar graph it always gives the wrong answer, but if I put a variable from the dimensiontable on the x axis (and a variable from the fact table on y axis) then it works just fine. I thought that the relationship would work the same in both directions??? 

@jono,

When you only drag the CardStatus ID of dimension_table and CardNumber of facttable to create the graph, the table is based on the unique combination of CardStatus ID+ CardNumber which doesn’t contain duplicated CardStatus ID for each CardNumber, thus you don’t get correct count number in the graph.
2.JPG

In your scenario, please create the graph by using CardStatus ID and CardNumber of facttable.
1.JPG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors