March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
Can any one help for below error?
In excel I have a valid price column and in that column has $amount and “Contract not started” comments, but when I try to replicate below formula in power bi I am getting below error.
Start Date = IF([Valid Price]="CONTRACT NOT STARTED","N","Y")
Data Type for valid price in power bi =Decimal
DAX comparison operations do not support comparing values of type Number with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
thanks
Solved! Go to Solution.
The data type of column [Valid Price] cannot be whole number or decimal if you have any rows with "Contract Not Yet Started". It would have to be text. I guess you don't have any rows that have that value?
It is not allowed to compare text and numbers.
Maybe use a number code for "CONTRACT NOT STARTED", like a negative number that I guess wont come up in prices?
I tried below,
Start Date = IF([Valid Price]=" ","N","Y")
but getting the same error.
Sure, you're still doing the same, comparing a number to text.
You could use the query editor to easily replace all occurrences of your text string with a number
Hi AIB,
problem is that VALID PRICE is a calculated column and i am not able to see in QUERY EDITOR.
Hang on, I'm getting confused here. If it's a calculated column, how have you been able to create one with numbers and text? What type is that column?
Hi,
Please see below forumula
Valid Price1 = IF((' Contracts'[Start Year]+[ Start Month]/12)<=([AUP Current Year]+[AUP Current Month]/12),[Monthly Discounted Price]&"" ,"Contract Not Yet Started")
***All columns data type is whole number,
The data type of column [Valid Price] cannot be whole number or decimal if you have any rows with "Contract Not Yet Started". It would have to be text. I guess you don't have any rows that have that value?
thank you so much AIB and Alexis i will share PBIX as soon as i can.Thanks
Hello Alexis & AIB,
Thank you so much for your suggestion.I have changed the "Contract Not Yeat Started" to 00000 and that works for me.
is this not text?? The concatenation [Monthly Discounted Price] & "" should produce text
Maybe it'd be quicker if you shared your pbix
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |