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
kafreitass
Helper I
Helper I

Sum by ID

Hi guys!

Can anybody help me?

I have a table with my sales (Vendas table).  These sales can be received in installments (Column Qtde de Parcelas)

Vendas.png

 

 

 

 

I have another Receipts table (Table Recebimentos). It contains all payments made from sales.

Recebimentos.png

I need to check if the sale was received, so I created a new table performing a merge between the ID.

When I perform the sum of the GROSS VALUE column (column VALOR BRUTO), it adds up all the lines, which is the amount of installments that the sale has. How could I perform this sum by ID?

As a final result I would like to check if the total amount of the sale has already been paid or if there are still open installments

 

1 ACCEPTED SOLUTION
JulienZH
Helper I
Helper I

Why don't you switch to a DAX Measure? If I were you I'd proceed this way:


- Start with setting up the relationship on Stone ID (apparenty 1 to Many from Vendas to Recebimientos)
- In a table (or matrix) visual, add:

  • Stone ID
  • Total = SUM(Vendas[Valor Bruto])
  • Total_Paid = SUM(Recebimientos[Valor Bruto])
  • Open_Amount = Total - Total_Paid

 

View solution in original post

3 REPLIES 3
mangaus1111
Solution Sage
Solution Sage

Hi @kafreitass ,

try this measure

SUMX(
    SUMMARIZE(
            'Facts',
            'Facts'[STONE ID],
            'Facts'[VALOR BRUTO]
            ),
    'Facts'[VALOR BRUTO]
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JulienZH
Helper I
Helper I

Why don't you switch to a DAX Measure? If I were you I'd proceed this way:


- Start with setting up the relationship on Stone ID (apparenty 1 to Many from Vendas to Recebimientos)
- In a table (or matrix) visual, add:

  • Stone ID
  • Total = SUM(Vendas[Valor Bruto])
  • Total_Paid = SUM(Recebimientos[Valor Bruto])
  • Open_Amount = Total - Total_Paid

 

@JulienZH I made it this way and it worked really well. Thanks

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.