cancel
Showing results for 
Search instead for 
Did you mean: 
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

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
TarunSharma
Responsive Resident
Responsive Resident

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

TarunSharma
Responsive Resident
Responsive Resident

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

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.

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?

@TarunSharma 

 

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

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

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
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps