Forum Discussion

monojchakrab's avatar
monojchakrab
Icon for Resolver III rankResolver III
4 years ago
Solved

MID function as a variable

Total shipped qty = SUMX('Amazon YTD','Amazon YTD'[Shipped Quantity]*RELATED('summary table'[MPU])) Hi All,   I have a table which have got the product name, which includes the Pack size as par...
  • amitchandak's avatar
    4 years ago

    monojchakrab , First bring this as a column -RELATED('summary table'[MPU]) 

    and then try MID

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi monojchakrab ,

     

    You want to extract the number from the strings in Size column, right?

    It is recommended that you use the LEFT() function to get the number.

    Measure = LEFT(MAX('Table'[SIZE]),LEN(MAX('Table'[SIZE]))-6)

     

    You will find that the numbers you propose are text types, you can modify the type manually, or you can add VALUE() to change the number type.

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.