Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I am trying to extract month and year form two text fields. It is either embedded in field1 or field2. I have to try field one first and if it can't be extracted from field1, then it should be extracted from field2.
Field1 Field2 ResultField
07184C 70007184c 0718
0RLET 0220RLET 0220
I am using following DAX command for calculated column resultfield
Solved! Go to Solution.
Right, so ISNUMBER isn't working because it is testing if it is a number. It is not, it is text. You probably want:
Column =
IF(
ISERROR(VALUE(LEFT([Field1],4))),
LEFT([Field2],4),
LEFT([Field1],4)
)
See attached.
I don't think 0 padding is the issue.
left(Sales[Field1],4) should return '0718' and why is that not being treated as number is the issue. Unfortunately, i have to use data as received.
Right, so ISNUMBER isn't working because it is testing if it is a number. It is not, it is text. You probably want:
Column =
IF(
ISERROR(VALUE(LEFT([Field1],4))),
LEFT([Field2],4),
LEFT([Field1],4)
)
See attached.
Thanks a ton Greg
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
15 | |
11 | |
8 | |
8 | |
8 |
User | Count |
---|---|
22 | |
13 | |
11 | |
10 | |
10 |