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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AlexGallet01
Helper IV
Helper IV

Foreach

Hi,

 

I need help for do a foreach. I want to calculate week number foreach send number but i have any times the send number so i want calculate the week number just one time foreach send number.

 

It's my formula but now i want to do this for send number

 

Délain livraison en semaine = IF('Expédition'[Délais]="RETARD";ROUNDDOWN('Expédition'[Interval]/-7;0))

1 ACCEPTED SOLUTION

Hi @AlexGallet01,

 

You can use Find() function to create a calcualted column like this:

 

Column = IF(FIND(160170,'Table1'[Column1],5,0)>0,-2,BLANK())

 

q5.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
AlexGallet01
Helper IV
Helper IV

Basically I have an expedition with several different lines. Everything with the same difference but since it is the same expedition I want to retrieve only one of the retuned values.

 

100-160170-011 -> -2

100-160170-025 -> -2

 

I want for 160170-> -2

Hi @AlexGallet01,

 

You can use Find() function to create a calcualted column like this:

 

Column = IF(FIND(160170,'Table1'[Column1],5,0)>0,-2,BLANK())

 

q5.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-qiuyu-msft
Community Support
Community Support

Hi @AlexGallet01,

 

Would you please share some sample data and expected results for our analysis?

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AlexGallet01
Helper IV
Helper IV

I want to do a foreach to calculate the number of weeks of delays in sending by number of shipments knowing that this number exists several times in my table.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.