Forum Discussion
Expressions that yield variant data-type cannot be used (multiply with constant value)
- Anonymous6 years ago
Anonymous
Make sure the datatypes are setup correctly in the power query editor. (QTY as wholenumber)
With your test data the following measure worked for me:
Column = IF ( All_Data_View[Shipping Site] = "XYZ", All_Data_View[Part Qty] * 15.2, IF ( All_Data_View[Shipping Site] = "ABC" && All_Data_View[Part Qty] < 100, All_Data_View[Part Qty] * 10, 50 ) )Kind regards
Joren Venema
Data & Analytics Consultant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily.
Hi Joren, Thanks!
I am doing this in new column, and still get this error "Expressions that yield variant data-type cannot be used to define calculated columns"
Regards,
CS
Anonymous
Make sure the datatypes are setup correctly in the power query editor. (QTY as wholenumber)
With your test data the following measure worked for me:
Column =
IF (
All_Data_View[Shipping Site] = "XYZ",
All_Data_View[Part Qty] * 15.2,
IF (
All_Data_View[Shipping Site] = "ABC"
&& All_Data_View[Part Qty] < 100,
All_Data_View[Part Qty] * 10,
50
)
)
Kind regards
Joren Venema
Data & Analytics Consultant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily.