Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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], "-", 1) + 1) + 1,
(FIND([Product Code], "-",
FIND([Product Code], "-", FIND([Product Code], "-", 1) + 1) + 1))
-
(FIND([Product Code],"-",
FIND([Product Code], "-", 1) + 1) + 1))) * 1)
ELSE
[Product Code]
END.
what String function can I use in place of STR in this code?
Solved! Go to Solution.
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.
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.
@efekrags , what are you trying to achieve here
Something like this
MID([Product Code], search("-",[Product Code],,0)+1, len([Product Code]))
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
refer :
to Split column in power query
https://www.youtube.com/watch?v=FyO9Vmhcfag
Power Query - Text.Start, Text.Middle, Text.End
https://www.youtube.com/watch?v=vky4wPqm0O0
DAX - MId, right, left : https://www.youtube.com/watch?v=-KChpAz_fUo
Search and find : https://www.youtube.com/watch?v=mZt0HJw4gjQ
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |