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
MaxPail22
Frequent Visitor

How repeat SUM for each ROW ?

Hi,

 

I want to repeat the SUM for this product for each row in this context :

 

2021-06-23_11h00_24.png.

 

How can I do that ? 

 

I've tried to make a mesure like this : 

Mesure = CALCULATE([Qte facturées],'Produits lancés'[Code produit] = "501067") but is not working...
 
Thank you per advance for your help.
 
Regards,

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @MaxPail22 
Can you check this out?
Mesure =
CALCULATE(
[Qte facturées],

ALL('Ligne de facture'),
'Produits lancés'[Code produit] = "501067" )

)

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

Hello @MaxPail22 
It'll be good if you share the sample data in table format or pbix file after removing the sensitive data.

Anonymous
Not applicable

Hello @MaxPail22 
You can try this.
Mesure =
CALCULATE( [Qte facturées],
FILTER(
ALL('Produits lancés'), 'Produits lancés'[Code produit] = "501067" )
)

Thank you for you'r response but it's not working..

 

I've the same result

Anonymous
Not applicable

Hello @MaxPail22 
If I'm right you want to show 25 in measure column. Isn't it?

Yes I want to repeat 25 for all row in my tab.

Anonymous
Not applicable

Hello @MaxPail22 
It can be done with ALL. Can you please share the formula for [Qte facturées] or some sample data after removing sensitive data?

@Anonymous 

 

The formula for [Qte facturées] : 

Qte facturées = SUM('Ligne de facture'[Quantite])
 
 

With fournisseur : 

 

In this case I want to repeat 25 for each row

2021-06-23_13h36_39.png

Without fournisseur :

2021-06-23_13h37_25.png

Anonymous
Not applicable

Hello @MaxPail22 
Can you check this out?
Mesure =
CALCULATE(
[Qte facturées],

ALL('Ligne de facture'),
'Produits lancés'[Code produit] = "501067" )

)

I think it's the good way, I've modified the formula like this : 

Mesure =
var selected = SELECTEDVALUE('Produits lancés'[Code produit + libellé])
RETURN
CALCULATE(
[Qte facturées],
ALL('Ligne de facture'),
'Produits lancés'[Code produit + libellé] = selected)
 
But now it's repeat for all my fournisseur :
 
2021-06-23_14h48_01.png

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