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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors