Forum Discussion

efekrags's avatar
efekrags
Regular Visitor
5 years ago
Solved

convert the str function to a DAX String Function

Need Urgent Help .Please How do I replicate this tableau Formula to a DAX Formula   If [Business Unit] = "TMG" Then STR(int(Mid([Product Code], Find([Product Code],"-", FIND([Product Code], "-"...
  • v-easonf-msft's avatar
    5 years ago

    Hi, efekrags 

    STR( ) is a data type conversion function in Tableau, which can convert numeric variables or constants into character variables or constants.

    In powerbi, it's unnecessary to use function to convert data types.You can directly change the Data type of calculated columns in the Column Tool as below:

     

     

    If you don’t like this method of manually changing the data type, you may try the format function.

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