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
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.