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
brinky
Helper IV
Helper IV

sum in table by source

Hello, 

I'm trying to get total sales by code and source from the following table, but for some reason I'm getting totals all same, any idea how to solve?

 

Sum by code and source.JPG

5 REPLIES 5
Mariusz
Community Champion
Community Champion

Hi @brinky 

Is the sum column in the same table as? 
Is it a Measure or Column that you are trying to create?

if so try to use CALCULATE( SUM( YourTable[SumColumn] ) )

If not, please can you provide extra info about your model.

 

Regards,
Mariusz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @Mariusz ,

 

Thanks for your prompt reply.

Would like to create a measure,  did try CALCULATE(SUM('retail_group grp_sales'[quantity])) did get same result.

Might be as quantity is coming fom another table.

 

Tables.JPG

 

Mariusz
Community Champion
Community Champion

Hi @brinky 

 

You need to change the cross filter direction on the relationship between Wine and Code to Both, like below.

 

image.png

 

Regards,
Mariusz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Mariusz ,

 

Did impove but I'm still not getting the correct numbers as per attached on the source/connection.

 

total.JPGupdate.JPG

Mariusz
Community Champion
Community Champion

Hi @brinky 

 

I looks like there is a problem with the way you join your tables.

Why there is duplicates in your wine table?

 

Regards,
Mariusz

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.