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.
Good morning, I would like you to provide me with a formula to obtain the value to return, that is to say without in the column percentage continent the value% returns me the value before the % of the contario that returns me white.
percentage | amount to be returned |
30d | white |
15d | white |
5d | white |
15d | white |
15d2% | 2% |
10d2% | 2% |
Thank you.
Solved! Go to Solution.
Hi @Syndicate_Admin ,
You can create a calculated column as below:
amount to be returned =
VAR _len =
LEN ( 'Table'[percentage] )
VAR _pplace =
IFERROR ( SEARCH ( "%", 'Table'[percentage], 1, 0 ), 0 )
VAR _dplace =
IFERROR ( SEARCH ( "d", 'Table'[percentage], 1, 0 ), 0 )
RETURN
IF (
_pplace > 0,
MID ( 'Table'[percentage], _dplace + 1, _pplace - _dplace ),
"white"
)
Best Regards
Hi @Syndicate_Admin ,
You can create a calculated column as below:
amount to be returned =
VAR _len =
LEN ( 'Table'[percentage] )
VAR _pplace =
IFERROR ( SEARCH ( "%", 'Table'[percentage], 1, 0 ), 0 )
VAR _dplace =
IFERROR ( SEARCH ( "d", 'Table'[percentage], 1, 0 ), 0 )
RETURN
IF (
_pplace > 0,
MID ( 'Table'[percentage], _dplace + 1, _pplace - _dplace ),
"white"
)
Best Regards
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 |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |