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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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