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
Hello,
I've have this measure to calculate slope which is necessary for another calculation. The slope measure has an X and Y variable that is filtered by Product ID. The current measure is as follows:
Prod_ID had been loaded into the model as ABC Text. The data I first used to test the model was for one product ID: 4488 (loaded as text) and all calculations were functioning properly. However, after I loaded more data the measure no longer works to what appears to be an issue with alphanumeric product id numbers. I then reverted the model back to the 1st version with the test data of 4488 but changed the number to product id: 4488u (everything else remained the same). Because the Prod ID now ends with a "u" I am receiving the same error that I received when loading the alphanumber product ids:
Any idea why the measure does not work with alphanumeric product ID's if the product IDs were brought into the model as ABC text?
Solved! Go to Solution.
Hi @JeanMariePBI ,
The second parameter of FILTER requires a boolean expression that is evaluated for each row of the table. So the error message says "Cannot convert text type values to true/false types".
If the column 'FromDWarehouse'[Prod_ID] is not a logical type, it may be implicitly converted in the calculated expression, or it may not be converted and an error occurs. You can try 'FromDWarehouse'[Prod_ID] = "XXXX".
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi @JeanMariePBI ,
The second parameter of FILTER requires a boolean expression that is evaluated for each row of the table. So the error message says "Cannot convert text type values to true/false types".
If the column 'FromDWarehouse'[Prod_ID] is not a logical type, it may be implicitly converted in the calculated expression, or it may not be converted and an error occurs. You can try 'FromDWarehouse'[Prod_ID] = "XXXX".
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Try FORMAT or VALUE in the filter to force convert the field to text or other intended data type?
Give Thumbs Up. Thanks!
Still fairly new to BI so I've assumed that your response regardingadding value to filter is this:
This change still produces the same error as described before. I am unclear about adding format to the filter. Could you please clarify? Thank you very much for your help.
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 |