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 create a new column with the following logic, but get the error message:
Cannot convert value '' of type Text to type Number.
This is my logic (mo_date is formatted as a shorthand date dd/mm/yyyy):
Solved! Go to Solution.
Hi, @Anonymous ;
Because format([date],"YY'") becomes text format. It is no longer possible to calculate, for example, in 2021, it will become "21" after format, and the format is text format *1-1 and cannot be calculated. So you can change to the following dax.
FY =
IF (
MONTH ( dim_mo[mo_date] ) >= 9,
FORMAT ( dim_mo[mo_date], "YY" ) & "/"
& RIGHT ( YEAR ( dim_mo[mo_date] ) + 1, 2 ),
RIGHT ( YEAR ( dim_mo[mo_date] ) - 1, 2 ) & "/"
& FORMAT ( dim_mo[mo_date], "YY" )
)
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
yes probaby you would need to handle your blanks by using an if statement something like
if(isblank(date), blank(), your conversion)
Proud to be a Super User!
Hi, @Anonymous ;
Because format([date],"YY'") becomes text format. It is no longer possible to calculate, for example, in 2021, it will become "21" after format, and the format is text format *1-1 and cannot be calculated. So you can change to the following dax.
FY =
IF (
MONTH ( dim_mo[mo_date] ) >= 9,
FORMAT ( dim_mo[mo_date], "YY" ) & "/"
& RIGHT ( YEAR ( dim_mo[mo_date] ) + 1, 2 ),
RIGHT ( YEAR ( dim_mo[mo_date] ) - 1, 2 ) & "/"
& FORMAT ( dim_mo[mo_date], "YY" )
)
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Try this calculated column formula
=if(month(dim_mo[mo_date]) >=9,year(dim_mo[mo_date])&"/"&year(dim_mo[mo_date])+1,year(dim_mo[mo_date])-1&"/"&year(dim_mo[mo_date]))
Hope this helps.
Thanks for your suggestion. I have tried this but get the following error message:
The syntax for '+' is incorrect.
Mine is a calculated column formula in DAX not a custom formula in M. Ensure that you are writing that as a calculated column formula in DAX. If it still does not help, then share the download link of your PBI file.
is your new column datatype text or a whole number?
what are you expecting?
Proud to be a Super User!
I have looked at the date field and can see I have (blanks) in there. Would that be what is causing this not to work?
yes probaby you would need to handle your blanks by using an if statement something like
if(isblank(date), blank(), your conversion)
Proud to be a Super User!
It's a text. The output I am expecting is the same are you're getting so not quite sure why mind doesn't work. Thanks for checking
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |