Forum Discussion

AlexGallet01's avatar
AlexGallet01
Helper IV
9 years ago
Solved

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))

4 Replies

  • 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.

  • 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

    • v-qiuyu-msft's avatar
      v-qiuyu-msft
      Community Support

      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())

       

       

      Best Regards,
      Qiuyun Yu